PDA

View Full Version : moveOverTime with deceleration time?



RobsoN
2nd June 2013, 21:02
Hello,

I was looking for moveOverTime function with deceleration time (like moveZ() ). So is there any algorithm for that? :)

Regards, RobsoN.

Tally
2nd June 2013, 21:05
Hello,

I was looking for moveOverTime function with deceleration time (like moveZ() ). So is there any algorithm for that? :)

Regards, RobsoN.

There is no algorithm. You just set the time in seconds. That's it!

kung foo man
2nd June 2013, 22:58
Well, the deceleration time could be "simulated" by calculating like 4 points in the deceleration-line (oldx,oldy to newx,newy), and each deceleration-point is used to move the hud slower to it.

Tally
2nd June 2013, 23:12
Well, the deceleration time could be "simulated" by calculating like 4 points in the declaration-line (oldx,oldy to newx,newy), and each declaration-point is used to move the hud slower to it.

I'm not 100% sure I know what you're saying, but here goes: moveOverTime() has only 1 argument. You cannot enter more than 1 argument, because it will throw an error. It is not like moveZ() as that is capable of 4 arguments. The closest you can come to entering more than 1 argument is by using randomIntRange() and entering 2 integers for randomizing between them.

kung foo man
3rd June 2013, 00:14
Yea, the 4 deceleration-points would need 4 extra-moveOverTime()'s


Would look like this:

294