playMaker

Author Topic: float interpolate + move. how to set increasing and decreasing speed ?  (Read 2936 times)

santelia

  • Junior Playmaker
  • **
  • Posts: 78
I have to manage the movement of an object (a boat) towards a target position. Since the constrain is the speed and not the time, and the target position can be very far away, I cannot use iTween actions (none of them) because with long distances they use too much space (and an incredible amount of time) for the easing (both in and out), resulting in an absolutely non realistic behavior.
So I'm trying to solve the problem by using a float interpolate for the speed of the acceleration (let's say 2 seconds), then a fixed speed for the rest of the movement minus 2 seconds (some math to obtain that), and then again a float interpolate for the braking speed.
If it were e. g. a scale factor instead of a speed factor (I mean for the acceleration and the braking), I could use a "Set Scale" action with "every frame" checked. But since it's a Move action, I cannot find how to set a variable speed referring to the float being interpolated.
Maybe I'm really blind and a proper action is already there, ready to be used. But I'm not been able to find it. Or maybe a rather simple solution can be build just passing around the obstacle.
Any help?
« Last Edit: July 06, 2012, 09:02:29 AM by santelia »

santelia

  • Junior Playmaker
  • **
  • Posts: 78
Maybe a second call for help can have more luck...

How can I set speed using the output of a float interpolate action?

santelia

  • Junior Playmaker
  • **
  • Posts: 78
No contributions?
In the meantime I think I'll try to work around the problem by using the set property action, see here http://hutonggames.com/playmakerforum/index.php?topic=1636.0
but I'm not sure if speed can be set.
Any help?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Hi,

 Have you try the action "Move towards" that is certainly going to help you better than tweening.

 you can control the max speed and the target can be moving.

bye,

 Jean