Breakroom is now Sinewave Campus. Book a meeting

SHingeJoint

العميلالمكونات
في هذا الصنفConnectedBody
  1. الخصائص
  2. ConnectedBody
  3. Axis
  4. Anchor
  5. ConnectedAnchor
  6. AutoConfigureConnectedAnchor
  7. BreakForce
  8. BreakTorque
  9. EnableCollision
  10. EnablePreprocessing
  11. CurrentForce
  12. CurrentTorque
  13. MassScale
  14. ConnectedMassScale
  15. Motor
  16. Limits
  17. Spring
  18. UseMotor
  19. UseLimits
  20. UseSpring
  21. Velocity
  22. Angle
  23. GameObject
الأعضاء 22
خاصيةConnectedBodySet joint to a rigidbody.
خاصيةAxisThe direction of the axis around which the body swings.
خاصيةAnchorThe position of the axis around which the body swings.
خاصيةConnectedAnchorManual configuration of the connected anchor position.
خاصيةAutoConfigureConnectedAnchorIf this is enabled, then the Connected Anchor position will be calculated automatically to match the global position of the anchor property.
خاصيةBreakForceApply the force to break the joint.
خاصيةBreakTorqueApply the torque to break the joint.
خاصيةEnableCollisionWhen checked, this enables collisions between bodies connected with a joint.
خاصيةEnablePreprocessingDisabling preprocessing helps to stabilize impossible-to-fulfil configurations.
خاصيةCurrentForceThe force applied by the solver to satisfy all constraints.
خاصيةCurrentTorqueThe torque applied by the solver to satisfy all constraints.
خاصيةMassScaleThe scale to apply to the inverse mass and inertia tensor of the body
خاصيةConnectedMassScaleThe scale to apply to the inverse mass and inertia tensor of the connected body
خاصيةMotorThe motor makes the object spin around.
خاصيةLimitsThe motor makes the object spin around.
خاصيةSpringThe motor makes the object spin around.
خاصيةUseMotorThe motor makes the object spin around.
خاصيةUseLimitsIf enabled, the angle of the hinge will be restricted within the Min & Max values.
خاصيةUseSpringSpring makes the Rigidbody reach for a specific angle compared to its connected body.
خاصيةVelocityThe angular velocity of the joint in degrees per second.
خاصيةAngleThe current angle in degrees of the joint relative to its rest position.
خاصيةGameObject–

الخصائص​

ConnectedBody​

SRigidbody ConnectedBody {get; set; }

Set joint to a rigidbody. If not set, the joint connects to the world.

مثال

Lua
connectedRigidBody = Space.Host.ExecutingObject.HingeJoint.ConnectedBody

Axis​

SVector Axis {get; set; }

The direction of the axis around which the body swings. The direction is defined in local space.

مثال

Lua
Space.Host.ExecutingObject.HingeJoint.Axis = Vector.New(0,1,0)

Anchor​

SVector Anchor {get; set; }

The position of the axis around which the body swings. The position is defined in local space.

مثال

Lua
Space.Host.ExecutingObject.HingeJoint.Anchor = Vector.New(0, 0.5 , 0)

ConnectedAnchor​

SVector ConnectedAnchor {get; set; }

Manual configuration of the connected anchor position.

مثال

Lua
Space.Host.ExecutingObject.HingeJoint.ConnectedAnchor = Vector.New(1,1,1)

AutoConfigureConnectedAnchor​

bool AutoConfigureConnectedAnchor {get; set; }

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.

مثال

Lua
Space.Host.ExecutingObject.HingeJoint.AutoConfigureConnectedAnchor = false

BreakForce​

float BreakForce {get; set; }

Apply the force to break the joint.

مثال

Lua
Space.Host.ExecutingObject.HingeJoint.BreakForce = 20

BreakTorque​

float BreakTorque {get; set; }

Apply the torque to break the joint.

مثال

Lua
Space.Host.ExecutingObject.HingeJoint.BreakTorque = 1

EnableCollision​

bool EnableCollision {get; set; }

When checked, this enables collisions between bodies connected with a joint.

مثال

Lua
Space.Host.ExecutingObject.HingeJoint.EnableCollision = true

EnablePreprocessing​

bool EnablePreprocessing {get; set; }

Disabling preprocessing helps to stabilize impossible-to-fulfil configurations.

مثال

Lua
Space.Host.ExecutingObject.HingeJoint.EnablePreprocessing = true

CurrentForceللقراءة فقط​

SVector CurrentForce {get; }

The force applied by the solver to satisfy all constraints.

مثال

Lua
vectorForce = Space.Host.ExecutingObject.HingeJoint.CurrentForce

CurrentTorqueللقراءة فقط​

SVector CurrentTorque {get; }

The torque applied by the solver to satisfy all constraints.

مثال

Lua
vectorTorque = Space.Host.ExecutingObject.HingeJoint.CurrentTorque

MassScale​

float MassScale {get; set; }

The scale to apply to the inverse mass and inertia tensor of the body

مثال

Lua
Space.Host.ExecutingObject.HingeJoint.MassScale = 2

ConnectedMassScale​

float ConnectedMassScale {get; set; }

The scale to apply to the inverse mass and inertia tensor of the connected body

مثال

Lua
Space.Host.ExecutingObject.HingeJoint.ConnectedMassScale = 2

Motor​

SJointMotor Motor {get; set; }

The motor makes the object spin around.

مثال

Lua
jointMotor = Space.Host.ExecutingObject.HingeJoint.Motor

Limits​

SJointLimits Limits {get; set; }

The motor makes the object spin around.

مثال

Lua
jointLimits = Space.Host.ExecutingObject.HingeJoint.Limits

Spring​

SJointSpring Spring {get; set; }

The motor makes the object spin around.

مثال

Lua
jointSpring = Space.Host.ExecutingObject.HingeJoint.Spring

UseMotor​

bool UseMotor {get; set; }

The motor makes the object spin around.

مثال

Lua
Space.Host.ExecutingObject.HingeJoint.UseMotor = true

UseLimits​

bool UseLimits {get; set; }

If enabled, the angle of the hinge will be restricted within the Min & Max values.

مثال

Lua
Space.Host.ExecutingObject.HingeJoint.UseLimits = true

UseSpring​

bool UseSpring {get; set; }

Spring makes the Rigidbody reach for a specific angle compared to its connected body.

مثال

Lua
Space.Host.ExecutingObject.HingeJoint.UseSpring = true

Velocityللقراءة فقط​

float Velocity {get; }

The angular velocity of the joint in degrees per second.

مثال

Lua
floatVelocity = Space.Host.ExecutingObject.HingeJoint.Velocity

Angleللقراءة فقط​

float Angle {get; }

The current angle in degrees of the joint relative to its rest position.

مثال

Lua
floatAngle = Space.Host.ExecutingObject.HingeJoint.Angle

GameObjectللقراءة فقط​

SGameObject GameObject {get; }

مثال

Lua
theGameObject = Space.Host.ExecutingObject.HingeJoint.GameObject