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



