Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: harribionic on March 11, 2013, 09:09:32 AM
-
Hi all,
I'm moving a character left and right currently using get key and translate, which does the trick, but i'd really like to use some of that itween ease in/out niceness. Any simple workrounds? Or am I looking at the physics of the object? or even some other way?
Cheers
Stu
-
Well, i would:
- use some variables "x velocity", "z velocity" for moving the character (floats)
- clamp velocity variables to your "max speed" (like.. between -10 and 10)
- when key is down you add/subtract to each variable by "acceleration" (float variable) - higher value, faster the character will get up to max speed
- multiply velocity variables by "de-celeration", which would be a value between 0 and 0.99 every frame, lower the amount - faster the character will slow down
You can alternatively play with gravity/sensitivity in your input settings, which is far simpler but not as flexible.