Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Arfoster on February 13, 2016, 10:15:06 AM
-
Hello to all,
I have a character which can move and shoot in any direction and I am seeking advice on how to play the characters walking animation backwards when moving in the opposite direction to the way their facing...
I would also like to capture sideways as well but one problem at a time!
As always many thanks in advance for any help provided.
Regards,
Arfoster
-
Hey,
I think what you can do is setup a variable let's say walkDirection and according to its value play a certain animation.
For example you can setup a float and when it is 1; you play walk forward. 2 would mean backward and sideways might be 3 and 4.
There might be another way but that is how I figured it out so far.
Hope that helps.
-
Thanks for your reply
But with my character rotating constantly how does that work?
I'm guessing I would have to abandon the character simple move altogether and introduce a whole new movement process?
Sounds complicated but I'll try it....
-
Hmm... I see what do you mean now. I think I missed that completely. Perhaps set an int variable and store the angle of your character. Then do a compare int where if the angle is more than X and less than Y it would move forward for example and then if it is between Z and M it would move backward?