Download

Which node do I need to know when my character is moving backward?

Hi, I’m currently working on an animal racing game.

I am looking for a way to know when my character is moving backward (I unticked “Orient rotation to movement” and that works just fine).

I tried multiple nodes, vector lenght which always gives me a positive number, forward vector the same.
The one I got closest to finding my answer is “Vector get sign vector” which somewhat works but if I do a 180 turn well that messes up my calculation.

I would need this info for 2 reasons, changing the camera angle/position when going backward and for adding my animation for walking backward.

Thanks very much for your help :slight_smile:

Do you use axis values? axis > 0 = move forward, axis < 0 = move backward?

Yes, there is a “Get MoveForward” node which if you are pressing the S button to go backwards from wherever you’re facing it gives a -1 value; a 1 value when moving forward and 0 when still. Does this help?