Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


PhysicsHingeJointDefinition

A joint definition used to specify properties when creating a PhysicsHingeJoint.
Read time 2 minutesLast updated 9 days ago

Definition

public struct PhysicsHingeJointDefinition

Constructors

Constructor

Description

PhysicsHingeJointDefinition()Create a default PhysicsHingeJoint definition.
PhysicsHingeJointDefinition(System.Boolean)Create a default PhysicsHingeJoint definition.

Properties

Property

Description

bodyAThe first body the joint constrains.
bodyBThe second body the joint constrains.
collideConnectedWhether the shapes on the pair of bodies can come into contact.
drawScaleControls the scaling of the joint drawing. Not all joints have scalable elements but those that do will use this scaling.
enableLimitEnable/disable the joint angle limit.
enableMotorEnable/disable the joint motor.
enableSpringEnable/Disable the rotational spring.
enableUnpinnedEnable/Disable unpinned mode where only Body A is affected and body B and its local anchor point is ignored. Body B must still be assigned so it is typical to assign a static ground body, preferably shared/reused.
forceThresholdThe force threshold beyond which a joint event will be produced.
localAnchorAThe local anchor frame constraint relative to bodyA's origin.
localAnchorBThe local anchor frame constraint relative to bodyB's origin.
lowerAngleLimitThe lower angle limit, in degrees.
maxMotorTorqueThe maximum torque the motor can apply, usually in newton-meters.
motorSpeedThe desired motor speed, usually in degrees per second.
springDampingThe spring damping, non-dimensional. Use 1 for critical damping.
springFrequencyThe spring stiffness frequency, in cycles per second.
springTargetAngleThe spring target angle, in degrees.
torqueThresholdThe torque threshold beyond which a joint event will be produced.
tuningDampingControls the joint stiffness damping, non-dimensional. Use 1 for critical damping.
tuningFrequencyControls the joint stiffness frequency, in cycles per second.
upperAngleLimitThe upper angle limit, in degrees.

Static Properties

Property

Description

defaultDefinitionCreate a default PhysicsHingeJoint definition.