I recently just used it myself to replace a 'move to' behavior. Instead of using one 'move to', I used two 'interpolate' behaviors: interpolate self.Position.X to self.StartPointX interpolate self.Position.Y to self.StartPointY
The amount of time is included in the behavior under Duration.
Use the 'ease out' function when you want the actor to decelerate as it reaches its destination, or 'ease in' to make it accelerate (ease in/out does both during the move). In my case, using this behavior does seem to be more reliable (with 'move to' my actors sometimes overshot their destinations for some odd reason), and the big plus is movement is more organic looking with easing.
Apparently you can also use interpolate for fades as well (fade the alpha of an actor from one value to another). Seems like a really useful behavior.
How do you make an up and down motion with interpolate? I can set the self.Position.Y to self.StartPointY for one direction but how do you stop it and make it go back on a timed basis? (do you still have to use a timer?)
I haven't looked at using interoperate for this yet but am using a timer with change velocity and self.Motion.Linear Velocity.X - self.Motion.Linear Velocity.X change attribute to make the actor go back and forth (or up down with Y) - that pauses if I put an otherwise velocity=0 in the rule set.
Comments
interpolate self.Position.X to self.StartPointX
interpolate self.Position.Y to self.StartPointY
The amount of time is included in the behavior under Duration.
Use the 'ease out' function when you want the actor to decelerate as it reaches its destination, or 'ease in' to make it accelerate (ease in/out does both during the move). In my case, using this behavior does seem to be more reliable (with 'move to' my actors sometimes overshot their destinations for some odd reason), and the big plus is movement is more organic looking with easing.
Apparently you can also use interpolate for fades as well (fade the alpha of an actor from one value to another). Seems like a really useful behavior.
You can use it for quite a few things. Music Volume comes to mind...
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
hope it help.
I've got a funny feeling it might not because it uses a timer, so a simple 'Pause on/off' switch may not work.
Good luck!
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io