Hello all.
I’m looking for a way to read the current rotation around a ConfigurableJoints axis.
I was hoping that there would be a joint.GetAngle(axis) method, but the world is not that simple, it seems.
There is no joint.GetAngle, indeed, but you can still figure out the rotated angle of a joint this way:
- Store the initial angle between the joint ‘host’ object’s transform.up (or whichever axis is orthogonal to your joint) and the same axis on the attached object
- Get the angle between those same two axes on an update loop
- subtract the initial angle
That should give you a persistent angle between both jointed objects, relative to their starting orientations.
Cheers