Notifications
Clear all
[Closed] Get final position from current position by slider value
Mar 28, 2015 6:48 am
Hi everybody
can anyone help me with this
we have a final position for ex [0,50,100] and we have a teapot at the [0,-20,40] position, now i like to get the final position from the current position by slider value
here it is my try
try destroyDialog test catch()
rollout test ""
(
slider sld range:[0,100,0]
on sld changed val do
(
final_pose=[0,50,100]
temppos=[final_pose.x/100,final_pose.y/100,final_pose.z/100]
$teapot001.pos =temppos*val
)
)
createDialog test
-------
And the problem is, when I divide the final_pose by 100 it become less then current $teapot001.pos in some axis.value so the teapot first moves to [0,0,0] and then goes tothe Final position by slider value.
if it was a single axis i could subtract the final and current pos and say if grater then..... but now it is 3 point value how should i do this
any help is so appreciated
Thanks in advance
2 Replies