Unit vector (rot) between parent and child
Hello, I'm trying to get a unit vector representation of the rotation between a child and its parent (using the parent's +Z as reference axis).
The way I'm currently doing it is: childTransform.localRotation * parentTransform.forward;
Is this the correct way? Also, how can I reverse-engineer this so that, given a parent, a child and a unit vector, can I get the angles this unit vector represents?
Thank you very much! :)
Your answer
![](https://koobas.hobune.stream/wayback/20220612195636im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Rotation Of Transform Does Not Result In Correct Value 0 Answers
rotate object2d the direction it is moving? 0 Answers
How to rotate a camera slowly along a tween? 1 Answer
Rotate a vector based on a direction (transform.up) of a game object 1 Answer
My camera is moving away from the object it's rotating around, how do I fix this? 0 Answers