playMaker

Author Topic: Getting the speed of the player[SOLVED]  (Read 1851 times)

Splankton

  • Sr. Member
  • ****
  • Posts: 268
Getting the speed of the player[SOLVED]
« on: April 27, 2015, 02:21:06 PM »
Hi,
If I have my player moving in one axis (x) I need to set the running animation speed relative to how fast or slow he moves.  How can I do this?

I've thought of getting the speed of the player then somehow converting that into a normalize value, so the animation can be set with that.

Can someone point me in the right direction, or give me some tips on how I can do this?
« Last Edit: April 28, 2015, 01:50:57 PM by Splankton »

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Getting the speed of the player
« Reply #1 on: April 27, 2015, 03:01:34 PM »
I use the "Get game object speed" action- its on eco-system- then I use that float to drive a "speed" mecanim float parameter to set the animation/animation speed-

Can use a "float multiply" to adjust the original speed var to an a range you want
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

Splankton

  • Sr. Member
  • ****
  • Posts: 268
Re: Getting the speed of the player
« Reply #2 on: April 28, 2015, 01:50:29 PM »
Thanks!