Differences
This shows you the differences between two versions of the page.
Both sides previous revision
Previous revision
Next revision
|
Previous revision
Next revision
Both sides next revision
|
hingejoint [2021/04/30 16:52] 151.202.25.206 |
hingejoint [2021/05/01 16:46] 73.95.178.156 |
====== HingeJoint ====== | ====== HingeJoint ====== |
| |
=== Things That Are Not True About HingeJoint: === | === Misconceptions === |
| * ''HingeJoint'' does not constrain the absolute ''rotation'' or ''localRotation'' of the Transform that it is attached to. It constrains the **relative** rotation between its own RigidBody and the Rigidbody in the ''ConnectedBody'' field. |
| |
A common misconception ((Or at least, a misconception held by me, the author of this page)) is that ''HingeJoint'' constrains the ''rotation'' or ''localRotation'' of the ''Transform'' that it is attached to. This is not strictly true. **''HingeJoint'' only constrains the relative rotation between its own ''RigidBody'' and the ''Rigidbody'' in the ''ConnectedBody'' field**. | * ''HingeJoint.angle'' and ''HingJoint.axis'' do not represent the rotation of the Transform that it is attached to. Ex: ''Quaternion.AngleAxis(hingeJoint.angle, hingeJoint.axis)'' does not equal ''hingeJoint.transform.rotation'' or ''hingeJoint.transform.localRotation''. |
| |
Another common misconception ((Again, by me, the author)) is that ''HingeJoint.angle'' and ''HingJoint.axis'' represent the ''rotation'' of the ''Transform'' that it is attached to. This is also not strictly true. That is, **''Quaternion.AngleAxis(hingeJoint.angle, hingeJoint.axis)'' does not necessarily equal ''hingeJoint.transform.rotation'' or ''hingeJoint.transform.localRotation''**. | |
| |
These two misconceptions, taken together, can make a ''HingeJoint'' behave quite differently from what you might expect. | These two misconceptions, taken together, can make a ''HingeJoint'' behave quite differently from what you might expect. |