- Home /
Rotation relativ animation paramter
I think this is reall simple but just cant wrap my hear around it,
I am working on a twin stick lick shooter (top down, 360 character rotation). In my animator I have two variables horizontal, vertical both from -1 to 1 indicating which of my animations in the locomotion blend tree should be played. Now the problem is, when I move forward (0,0,1) but look to the right (the charater rotation) (1,0,0) how can I align the input relativ to the look/aim direction so I can pass it to the animator.
Example:
The input is backward, but the aim direction is left. This means in the animator I want horizontal to have a value of -1 (going left) and vertical of 0 because while moving vertically, the animation that should be playing is going sideways, because the character is rotated to look to the left.
Your answer
![](https://koobas.hobune.stream/wayback/20220612224827im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Determining the rotation of an object based on its upcoming position? 1 Answer
My walking animations root motion has a problem when my mouse look script is being used? 0 Answers
How to calculate xSpeed and ySpeed according to float value of rotation? 1 Answer
How do I stop unwanted rotations? 4 Answers
Object leaning with 2D movement 2 Answers