SHingeJoint
| Property | ConnectedBody | Set joint to a rigidbody. |
| Property | Axis | The direction of the axis around which the body swings. |
| Property | Anchor | The position of the axis around which the body swings. |
| Property | ConnectedAnchor | Manual configuration of the connected anchor position. |
| Property | AutoConfigureConnectedAnchor | If this is enabled, then the Connected Anchor position will be calculated automatically to match the global position of the anchor property. |
| Property | BreakForce | Apply the force to break the joint. |
| Property | BreakTorque | Apply the torque to break the joint. |
| Property | EnableCollision | When checked, this enables collisions between bodies connected with a joint. |
| Property | EnablePreprocessing | Disabling preprocessing helps to stabilize impossible-to-fulfil configurations. |
| Property | CurrentForce | The force applied by the solver to satisfy all constraints. |
| Property | CurrentTorque | The torque applied by the solver to satisfy all constraints. |
| Property | MassScale | The scale to apply to the inverse mass and inertia tensor of the body |
| Property | ConnectedMassScale | The scale to apply to the inverse mass and inertia tensor of the connected body |
| Property | Motor | The motor makes the object spin around. |
| Property | Limits | The motor makes the object spin around. |
| Property | Spring | The motor makes the object spin around. |
| Property | UseMotor | The motor makes the object spin around. |
| Property | UseLimits | If enabled, the angle of the hinge will be restricted within the Min & Max values. |
| Property | UseSpring | Spring makes the Rigidbody reach for a specific angle compared to its connected body. |
| Property | Velocity | The angular velocity of the joint in degrees per second. |
| Property | Angle | The current angle in degrees of the joint relative to its rest position. |
| Property | GameObject | – |
Properties
ConnectedBody
Set joint to a rigidbody. If not set, the joint connects to the world.
Example
connectedRigidBody = Space.Host.ExecutingObject.HingeJoint.ConnectedBody
Axis
The direction of the axis around which the body swings. The direction is defined in local space.
Example
Space.Host.ExecutingObject.HingeJoint.Axis = Vector.New(0,1,0)
Anchor
The position of the axis around which the body swings. The position is defined in local space.
Example
Space.Host.ExecutingObject.HingeJoint.Anchor = Vector.New(0, 0.5 , 0)
ConnectedAnchor
Manual configuration of the connected anchor position.
Example
Space.Host.ExecutingObject.HingeJoint.ConnectedAnchor = Vector.New(1,1,1)
AutoConfigureConnectedAnchor
If this is enabled, then the Connected Anchor position will be calculated automatically to match the global position of the anchor property. This is the default behavior. If this is disabled, you can configure the position of the connected anchor manually.
Example
Space.Host.ExecutingObject.HingeJoint.AutoConfigureConnectedAnchor = false
BreakForce
Apply the force to break the joint.
Example
Space.Host.ExecutingObject.HingeJoint.BreakForce = 20
BreakTorque
Apply the torque to break the joint.
Example
Space.Host.ExecutingObject.HingeJoint.BreakTorque = 1
EnableCollision
When checked, this enables collisions between bodies connected with a joint.
Example
Space.Host.ExecutingObject.HingeJoint.EnableCollision = true
EnablePreprocessing
Disabling preprocessing helps to stabilize impossible-to-fulfil configurations.
Example
Space.Host.ExecutingObject.HingeJoint.EnablePreprocessing = true
CurrentForceRead only
The force applied by the solver to satisfy all constraints.
Example
vectorForce = Space.Host.ExecutingObject.HingeJoint.CurrentForce
CurrentTorqueRead only
The torque applied by the solver to satisfy all constraints.
Example
vectorTorque = Space.Host.ExecutingObject.HingeJoint.CurrentTorque
MassScale
The scale to apply to the inverse mass and inertia tensor of the body
Example
Space.Host.ExecutingObject.HingeJoint.MassScale = 2
ConnectedMassScale
The scale to apply to the inverse mass and inertia tensor of the connected body
Example
Space.Host.ExecutingObject.HingeJoint.ConnectedMassScale = 2
Motor
The motor makes the object spin around.
Example
jointMotor = Space.Host.ExecutingObject.HingeJoint.Motor
Limits
The motor makes the object spin around.
Example
jointLimits = Space.Host.ExecutingObject.HingeJoint.Limits
Spring
The motor makes the object spin around.
Example
jointSpring = Space.Host.ExecutingObject.HingeJoint.Spring
UseMotor
The motor makes the object spin around.
Example
Space.Host.ExecutingObject.HingeJoint.UseMotor = true
UseLimits
If enabled, the angle of the hinge will be restricted within the Min & Max values.
Example
Space.Host.ExecutingObject.HingeJoint.UseLimits = true
UseSpring
Spring makes the Rigidbody reach for a specific angle compared to its connected body.
Example
Space.Host.ExecutingObject.HingeJoint.UseSpring = true
VelocityRead only
The angular velocity of the joint in degrees per second.
Example
floatVelocity = Space.Host.ExecutingObject.HingeJoint.Velocity
AngleRead only
The current angle in degrees of the joint relative to its rest position.
Example
floatAngle = Space.Host.ExecutingObject.HingeJoint.Angle
GameObjectRead only
Example
theGameObject = Space.Host.ExecutingObject.HingeJoint.GameObject



