PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

HingeConstraint

Show deprecated

HingeConstraint

Show deprecated

A HingeConstraint allows two Attachment|Attachments to rotate about one axis, constraining the two attachments so that they both occupy the same position and that their X axes point in the same direction.

Hinges can also be configured to actuate rotation, as follows:

  • If HingeConstraint/ActuatorType is set to Enum/ActuatorType|Motor, the hinge will attempt to rotate the attachments with the goal of reaching HingeConstraint/AngularVelocity. This rotation is limited by both HingeConstraint/MotorMaxAcceleration and HingeConstraint/MotorMaxTorque.
  • If HingeConstraint/ActuatorType is set to Enum/ActuatorType|Servo, the hinge will attempt to rotate to an angle specified by HingeConstraint/TargetAngle. This rotation is limited by both HingeConstraint/AngularSpeed and HingeConstraint/ServoMaxTorque.

Note that both actuated and free spinning rotation can be limited by setting HingeConstraint/LimitsEnabled to true. Also note that if this constraint attaches one part (A) to another part (B) that is anchored or connected to an anchored part (Z), part A will not be locally simulated when interacting with a player.

Properties

ActuatorType

ActuatorType

Sets whether the rotation of the HingeConstraint is actuated and, if so, what kind of actuation.

float

AngularSpeed

The desired angular speed a HingeConstraint with HingeConstraint/ActuatorType set to Enum/ActuatorType|Servo will attempt to maintain while rotating towards its HingeConstraint/TargetAngle. Measured in radians/second.

float

AngularVelocity

The angular velocity a HingeConstraint with HingeConstraint/ActuatorType set to Enum/ActuatorType|Motor will attempt to achieve. Measured in radians/second.

float

CurrentAngle

[ReadOnly] [NotReplicated]

The current angle of the HingeConstraint.

bool

LimitsEnabled

Sets whether the HingeConstraint will limit the range of rotation.

float

LowerAngle

The minimum rotation angle the HingeConstraint will allow if HingeConstraint/LimitsEnabled is true.

float

MotorMaxAcceleration

The maximum angular acceleration a HingeConstraint with HingeConstraint/ActuatorType set to Enum/ActuatorType|Motor can apply to achieve its HingeConstraint/AngularVelocity. Measured in radians/(second squared).

float

MotorMaxTorque

The maximum torque a HingeConstraint with HingeConstraint/ActuatorType set to Enum/ActuatorType|Motor can apply when trying to reach its desired HingeConstraint/AngularVelocity.

float

Radius

The visualized radius of the HingeConstraint.

float

Restitution

How elastic Attachment connected by a HingeConstraint will be when they reach the end of the range when HingeConstraint/LimitsEnabled is true. Constrained between 0 and 1.

float

ServoMaxTorque

The maximum torque a HingeConstraint with HingeConstraint/ActuatorType set to Enum/ActuatorType|Servo can apply when trying to reach its desired HingeConstraint/TargetAngle.

float

TargetAngle

The target angle a HingeConstraint will attempt to rotate to if its HingeConstraint/ActuatorType is set to Enum/ActuatorType|Servo. Measured in degrees.

float

UpperAngle

The maximum rotation angle the HingeConstraint will allow if HingeConstraint/LimitsEnabled is true.

Functions

Events