how to use interpolate function?
cptongsg
Member Posts: 70
Hi, how to use Linear, ease in, easeout..... function?
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