Uninomicon

Documenting the dark corners of the Unity Engine.

User Tools

Site Tools


hingejoint

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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
Line 1: Line 1:
 ====== 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(hinge.angle, hinge.axis)'' is not equivalent to''hinge.transform.rotation'' or ''hinge.transform.localRotation''.
- +
-Another common misconception ((Again, by me, this 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. 
hingejoint.txt · Last modified: 2021/05/01 16:59 by 73.95.178.156