- Home /
convert direction from local space to world space
I know I can use Transform.TransformDirection(Vector3) to do this in unity, however I'm offloading the physics calculations (using bullet physics library) to my remote command line server, so would like to know how the function accomplishes this.
Answer by HarshadK · Nov 23, 2016 at 05:59 AM
Here are some of the nicely written tutorials on Transformation Matrices.
The gist is that you have to multiply your direction vector with the Transformation Matrix to convert between world to local space. The two matrices in Unity are Transform.localToWorldMatrix and Transform.worldToLocalMatrix.
E.g. transformedVector = Transform.localToWorldMatrix * myVector;
Your answer

Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
PHP Image to C# 2D Texture 2 Answers
Illuminating a 3D object's edges OnMouseOver (script in c#)? 1 Answer
Flip over an object (smooth transition) 3 Answers