Hello,
I wonder if there is a way to "ease in/ease out" movements like Adobe After Effects?
If you never used Aftere Effects please take a look the illustrate in this document: http://jjgifford.com/expressions/basics ... ation.html
I'm trying to create a function which can move a node to any specific position. I'd be great if I can make it moves smoothly.
Thanks, V.
A way to "ease in/ease out" movements?
Sin function would work nicely for this.
Try something like:
Where fullSpeed is the speed you want it to travel at the middle of the journey and journeyRatio is a value from 0 to 1 that says how far along it is (DistanceTravelled / TotalDistance).
Hope that works! (Didn't test )
EDIT: Oops just realised you should do:
Where initialSpeed is a slow speed it will travel at the start and end, otherwise it won't move at all at the start and the speed will stay a constant 0!
Try something like:
Code: Select all
currentSpeed = fullSpeed * Sin(journeyRatio * (PI / 2));
Hope that works! (Didn't test )
EDIT: Oops just realised you should do:
Code: Select all
currentSpeed = initialSpeed + fullSpeed * Sin(journeyRatio * (PI / 2));
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net