Forward/backwards/left/right are all relative, so generally what you do is check the input values themselves. If I get the input values for my “MoveForward” axis, then I know > 0.0 is moving forward, < 0.0 is moving backwards. Same with “MoveRight” to determine left/right movement.
For most cases using a standard character, there will not be a big difference between axis values and movement speed. Axis values are translated more to acceleration, but generally for characters there is not much drifting going on so using input values will probably work fine.
But if you really want to know instantaneous movement direction, you can use the dot product as follows. This will deal correctly with cases where, for example, your input is reverse, but your characters momentum is still carrying him forwards.
To clarify, these values give you the components of velocity in the direction the character is facing, and perpendicular to the direction the character is facing. Negative values mean the character is moving backwards/to his left.
This is a good point, in all honestly you’ll probably want both methods: Input Direction, and Velocity Direction so you can better tailor your blend spaces to match what is happening to the characters vs player intent.