Hi,
How can I get the relative angle a HingeJoint has rotated from its initial rotation if the joint has a connected body? If the joint stays shut but the connected body moves, HingeJoint.angle seems to change.
Thanks!
Hi,
How can I get the relative angle a HingeJoint has rotated from its initial rotation if the joint has a connected body? If the joint stays shut but the connected body moves, HingeJoint.angle seems to change.
Thanks!
Still after this answer. How can I tell a door has shut for instance if the wall it’s attached to (its connected body) moves? I assumed HingeJoint.angle would tell me this but it isn’t relative to its own joint it seems.
I’m hoping a picture may help my cause! This is my box with a lid. It uses a hinge joint to open the lid.
How can I get the angle from initial (closed) if the box Rigidbody moves around? Should Hinge.Angle be the relative angle because that is not the case.
Thanks!
Why not just measure the angle between the two transforms (hingeTransform and wallTransform) using Vector3.Angle(). ?
Well they might not be pointing in the same direction at initial but I guess I could calculate the initial delta. Will give that a shot. But wondering if Hinge.Angle is broken?
I agree with you. This is still a problem 3 years later. Can someone from the Unity team please look into this?