- Home /
Question by
ShinyTaco · Mar 25, 2013 at 09:29 AM ·
converthowworld spacelocal space
How to Convert moveDirection.z = 20 to Local Space?
Hey guys,
Was wondering if somebody could help out? How can you convert:
moveDirection.z = 20;
to local space?
Is it possible?
Thanks!
Comment
Best Answer
Answer by whydoidoit · Mar 25, 2013 at 09:57 AM
Presuming you have that in a Vector3:
var localVector = transform.InverseTransformDirection(moveDirection);
Your answer
![](https://koobas.hobune.stream/wayback/20220613095037im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Problem with bullet projectiles direction 2 Answers
Rigidbody constraints in local space? 7 Answers
Help with rigidbody slowing (inertia dampening) 0 Answers
Move camera along 2 axes in WorldSpace 2 Answers