Question by
R-SchutzGames · Dec 07, 2019 at 08:09 PM ·
c#animationscharacter movement
How do i calculate in which direction my character is moving relative to it's rotation?
I am moving my character with Vector3.MoveTowards(). How do i know which direction my character is moving in relative to it's transform.forward?
for example: the face of my character is facing left and the movement is facing forward. in that example you know that the direction is facing right.
Does anybody know how to calculate this in code? FYI i would like to use this for animating the character based on it's movement value.
Thanks!
Comment
maybe a better explaination: how do you know in code if the character's movement is strafing?