- Home /
AI strafe animations
I need to play animations on strafing AI depending on where it's facing. I didn't find any good info on internet. And of course AI doesn't use any input. Exactly what I need: I need to determine when I should play left-right strafe animations if transform is moving right-left in it's relative space(basically to determine if forward is on X or Z). I know there is method Transform.TransformDirection but I don't quite understand how to use it. Picture related.
Answer by conguerror · May 11, 2021 at 01:13 PM
You can use Transform.InverseTransformVector() to translate the velocity from world coordinates to local [or directly multiply the global velocity by the worldToLocalMatrix].
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Multiple Cars not working 1 Answer
Any way to pause the Trail Renderer ? 1 Answer
Why is transform.LookAt backwards for my model? 2 Answers
How to move the parent object to a child of one of its children? 2 Answers