How to compare two rotations from children objects

So I’m trying to compare positions and rotations of two hand objects (manipulated by VR) to another avatar’s hand objects. The hierarchy of these objects is the same - an empty gameobject holds the avatar, and the avatar has children such as hips, spine, arms, hands, etc. I got the position comparison to work correctly but using inverse transform point and then flipping the z axis since the avatars are facing each other. I cant figure out the rotations however. I’ve attempted just comparing one hand’s rotation to the other avatar’s hand rotation, using Quaternion.Angle() but it’s not giving the expected results. I’m not too familiar with Quaternions and how to use them, but is there something I need to do like with the position to get the correct comparison results?

Hi there,

So, I am not sure what you are looking for.

But there is a property in the transform component that gives you exactly the angles in degrees of your object’s rotation:

Vector3 myRotation = transform.eulerAngles;

If you use the property “localEulerAngles” you will get also a Vector3 with the angles of rotation in degrees, but this time, they will be relative to the parent rotation.

I am not a big fan of Quaternions, so I don’t like to use them personally… So there is always a way to still use degrees, or make it work with a simpler solution.

Hope it helps.