HingeConstraint
Constrains its attachments to rotate about a single axis.
Memory category | PhysicsParts |
---|
Member index 15
Description
A HingeConstraint allows two 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.
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.
When configuring this constraint, it may be helpful to study Roblox Units to understand how Roblox units compare to metric units.
Angular Power
Hinges can be configured to actuate rotation. If a hinge's ActuatorType is set to Motor, it attempts to rotate the attachments with the goal of reaching its AngularVelocity. You can further control this rotation through both MotorMaxAcceleration and MotorMaxTorque. If a hinge's ActuatorType is set to Servo, it attempts to rotate to an angle specified by TargetAngle. This rotation is controlled by both AngularSpeed and ServoMaxTorque.
Limits
You can set limits to restrict the rotation of a hinge, useful for mechanisms like doors which should only swing open or closed within a set range. Enabling the LimitsEnabled property exposes the LowerAngle and UpperAngle limits, as well as Restitution which defines the elasticity of the attachments when they reach either limit.
History 62
- 611 Change Tags of SoftlockServoUponReachingTarget from [] to [Deprecated]
- 605 Change Default of MotorMaxAcceleration from INF to 500000
- 600 Add SoftlockServoUponReachingTarget
- 553 Change Default of UpperAngle from to 45
- 553 Change Default of TargetAngle from to 0
- 553 Change Default of ServoMaxTorque from to 0
- 553 Change Default of Restitution from to 0
- 553 Change Default of Radius from to 0.150000006
- 553 Change Default of MotorMaxTorque from to 0
- 553 Change Default of MotorMaxAcceleration from to INF
- 553 Change Default of LowerAngle from to -45
- 553 Change Default of LimitsEnabled from to false
- 553 Change Default of CurrentAngle from to 0
- 553 Change Default of AngularVelocity from to 0
- 553 Change Default of AngularSpeed from to 0
- 553 Change Default of AngularResponsiveness from to 45
- 553 Change Default of ActuatorType from to None
- 486 Change ThreadSafety of UpperAngle from ReadOnly to ReadSafe
- 486 Change ThreadSafety of TargetAngle from ReadOnly to ReadSafe
- 486 Change ThreadSafety of ServoMaxTorque from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Restitution from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Radius from ReadOnly to ReadSafe
- 486 Change ThreadSafety of MotorMaxTorque from ReadOnly to ReadSafe
- 486 Change ThreadSafety of MotorMaxAcceleration from ReadOnly to ReadSafe
- 486 Change ThreadSafety of LowerAngle from ReadOnly to ReadSafe
- 486 Change ThreadSafety of LimitsEnabled from ReadOnly to ReadSafe
- 486 Change ThreadSafety of CurrentAngle from ReadOnly to ReadSafe
- 486 Change ThreadSafety of AngularVelocity from ReadOnly to ReadSafe
- 486 Change ThreadSafety of AngularSpeed from ReadOnly to ReadSafe
- 486 Change ThreadSafety of AngularResponsiveness from ReadOnly to ReadSafe
- 486 Change ThreadSafety of ActuatorType from ReadOnly to ReadSafe
- 470 Add AngularResponsiveness
- 462 Change ThreadSafety of UpperAngle from to ReadOnly
- 462 Change ThreadSafety of TargetAngle from to ReadOnly
- 462 Change ThreadSafety of ServoMaxTorque from to ReadOnly
- 462 Change ThreadSafety of Restitution from to ReadOnly
- 462 Change ThreadSafety of Radius from to ReadOnly
- 462 Change ThreadSafety of MotorMaxTorque from to ReadOnly
- 462 Change ThreadSafety of MotorMaxAcceleration from to ReadOnly
- 462 Change ThreadSafety of LowerAngle from to ReadOnly
- 462 Change ThreadSafety of LimitsEnabled from to ReadOnly
- 462 Change ThreadSafety of CurrentAngle from to ReadOnly
- 462 Change ThreadSafety of AngularVelocity from to ReadOnly
- 462 Change ThreadSafety of AngularSpeed from to ReadOnly
- 462 Change ThreadSafety of ActuatorType from to ReadOnly
- 454 Change MemoryCategory of HingeConstraint from Instances to PhysicsParts
- 452 Change MemoryCategory of HingeConstraint from PhysicsParts to Instances
- 453 Change MemoryCategory of HingeConstraint from Instances to PhysicsParts
- 261 Add Radius
- 241 Add UpperAngle
- 241 Add TargetAngle
- 241 Add ServoMaxTorque
- 241 Add Restitution
- 241 Add MotorMaxTorque
- 241 Add MotorMaxAcceleration
- 241 Add LowerAngle
- 241 Add LimitsEnabled
- 241 Add CurrentAngle
- 241 Add AngularVelocity
- 241 Add AngularSpeed
- 241 Add ActuatorType
- 241 Add HingeConstraint
Members 15
ActuatorType
Type | Default | |
---|---|---|
ActuatorType | None |
Sets whether the rotation of the HingeConstraint is actuated and, if so, what kind of actuation.
- If ActuatorType is set to Motor, the hinge will attempt to rotate the attachments with the goal of reaching AngularVelocity. This rotation is limited by both MotorMaxAcceleration and MotorMaxTorque.
- If ActuatorType is set to Servo, the hinge will attempt to rotate to an angle specified by TargetAngle. This rotation is limited by both AngularSpeed and ServoMaxTorque.
Note that both actuated and free spinning rotation can be limited by setting LimitsEnabled to true.
Thread safety | ReadSafe |
---|---|
Category | Hinge |
Loaded/Saved | true |
History 4
- 553 Change Default of ActuatorType from to None
- 486 Change ThreadSafety of ActuatorType from ReadOnly to ReadSafe
- 462 Change ThreadSafety of ActuatorType from to ReadOnly
- 241 Add ActuatorType
AngularResponsiveness
Type | Default | |
---|---|---|
float | 45 |
This property specifies the sharpness of the servo motor in reaching the TargetAngle, when ActuatorType is set to Servo. Larger values correspond to a faster response and smaller values results in more damping and a slower response.
Thread safety | ReadSafe |
---|---|
Category | Servo |
Loaded/Saved | true |
History 3
- 553 Change Default of AngularResponsiveness from to 45
- 486 Change ThreadSafety of AngularResponsiveness from ReadOnly to ReadSafe
- 470 Add AngularResponsiveness
AngularSpeed
Type | Default | |
---|---|---|
float | 0 |
The desired angular speed a HingeConstraint with ActuatorType set to Servo will attempt to maintain while rotating towards its TargetAngle. Measured in radians/second.
Thread safety | ReadSafe |
---|---|
Category | Servo |
Loaded/Saved | true |
History 4
- 553 Change Default of AngularSpeed from to 0
- 486 Change ThreadSafety of AngularSpeed from ReadOnly to ReadSafe
- 462 Change ThreadSafety of AngularSpeed from to ReadOnly
- 241 Add AngularSpeed
AngularVelocity
Type | Default | |
---|---|---|
float | 0 |
The angular velocity a HingeConstraint with ActuatorType set to Motor will attempt to achieve. Measured in radians/second.
Thread safety | ReadSafe |
---|---|
Category | Motor |
Loaded/Saved | true |
History 4
- 553 Change Default of AngularVelocity from to 0
- 486 Change ThreadSafety of AngularVelocity from ReadOnly to ReadSafe
- 462 Change ThreadSafety of AngularVelocity from to ReadOnly
- 241 Add AngularVelocity
CurrentAngle
Type | Default | |
---|---|---|
float | 0 |
The current angle of the HingeConstraint. This angle is calculated by measuring the angle separation of the Y axes of the Attachments.
Thread safety | ReadSafe |
---|---|
Category | Derived |
Loaded/Saved | false/true |
History 4
- 553 Change Default of CurrentAngle from to 0
- 486 Change ThreadSafety of CurrentAngle from ReadOnly to ReadSafe
- 462 Change ThreadSafety of CurrentAngle from to ReadOnly
- 241 Add CurrentAngle
LimitsEnabled
Type | Default | |
---|---|---|
bool | false |
Sets whether the HingeConstraint will limit the range of rotation. If enabled, the constraint will only allow the CurrentAngle to be between LowerAngle and UpperAngle. If the Attachment reach the end of the limited range of rotation then they will stop rotating. If Restitution is greater than 0 then the attachments will bounce when they hit the ends of the limited range.
Thread safety | ReadSafe |
---|---|
Category | Hinge |
Loaded/Saved | true |
History 4
- 553 Change Default of LimitsEnabled from to false
- 486 Change ThreadSafety of LimitsEnabled from ReadOnly to ReadSafe
- 462 Change ThreadSafety of LimitsEnabled from to ReadOnly
- 241 Add LimitsEnabled
LowerAngle
Type | Default | |
---|---|---|
float | -45 |
The minimum rotation angle the HingeConstraint will allow if LimitsEnabled is true. Measured in degrees.
Thread safety | ReadSafe |
---|---|
Category | Limits |
Loaded/Saved | true |
History 4
- 553 Change Default of LowerAngle from to -45
- 486 Change ThreadSafety of LowerAngle from ReadOnly to ReadSafe
- 462 Change ThreadSafety of LowerAngle from to ReadOnly
- 241 Add LowerAngle
MotorMaxAcceleration
Type | Default | |
---|---|---|
float | 500000 |
The maximum angular acceleration a HingeConstraint with ActuatorType set to Motor can apply to achieve its AngularVelocity. Measured in radians/second².
Thread safety | ReadSafe |
---|---|
Category | Motor |
Loaded/Saved | true |
History 5
- 605 Change Default of MotorMaxAcceleration from INF to 500000
- 553 Change Default of MotorMaxAcceleration from to INF
- 486 Change ThreadSafety of MotorMaxAcceleration from ReadOnly to ReadSafe
- 462 Change ThreadSafety of MotorMaxAcceleration from to ReadOnly
- 241 Add MotorMaxAcceleration
MotorMaxTorque
Type | Default | |
---|---|---|
float | 0 |
The maximum torque a HingeConstraint with ActuatorType set to Motor can apply when trying to reach its desired AngularVelocity.
Thread safety | ReadSafe |
---|---|
Category | Motor |
Loaded/Saved | true |
History 4
- 553 Change Default of MotorMaxTorque from to 0
- 486 Change ThreadSafety of MotorMaxTorque from ReadOnly to ReadSafe
- 462 Change ThreadSafety of MotorMaxTorque from to ReadOnly
- 241 Add MotorMaxTorque
Radius
Type | Default | |
---|---|---|
float | 0.150000006 |
The visualized radius of the HingeConstraint.
Thread safety | ReadSafe |
---|---|
Category | Appearance |
Loaded/Saved | true |
Restitution
Type | Default | |
---|---|---|
float | 0 |
How elastic Attachment connected by a HingeConstraint will be when they reach the end of the range when LimitsEnabled is true. Constrained between 0 and 1.
Thread safety | ReadSafe |
---|---|
Category | Limits |
Loaded/Saved | true |
History 4
- 553 Change Default of Restitution from to 0
- 486 Change ThreadSafety of Restitution from ReadOnly to ReadSafe
- 462 Change ThreadSafety of Restitution from to ReadOnly
- 241 Add Restitution
ServoMaxTorque
Type | Default | |
---|---|---|
float | 0 |
The maximum torque a HingeConstraint with ActuatorType set to Servo can apply when trying to reach its desired TargetAngle.
Thread safety | ReadSafe |
---|---|
Category | Servo |
Loaded/Saved | true |
History 4
- 553 Change Default of ServoMaxTorque from to 0
- 486 Change ThreadSafety of ServoMaxTorque from ReadOnly to ReadSafe
- 462 Change ThreadSafety of ServoMaxTorque from to ReadOnly
- 241 Add ServoMaxTorque
SoftlockServoUponReachingTarget
Type | Default | |
---|---|---|
bool | false |
Thread safety | ReadSafe |
---|---|
Category | Servo |
Loaded/Saved | true |
History 2
- 611 Change Tags of SoftlockServoUponReachingTarget from [] to [Deprecated]
- 600 Add SoftlockServoUponReachingTarget
TargetAngle
Type | Default | |
---|---|---|
float | 0 |
The target angle a HingeConstraint will attempt to rotate to if its ActuatorType is set to Servo. Measured in degrees.
Thread safety | ReadSafe |
---|---|
Category | Servo |
Loaded/Saved | true |
History 4
- 553 Change Default of TargetAngle from to 0
- 486 Change ThreadSafety of TargetAngle from ReadOnly to ReadSafe
- 462 Change ThreadSafety of TargetAngle from to ReadOnly
- 241 Add TargetAngle
UpperAngle
Type | Default | |
---|---|---|
float | 45 |
The maximum rotation angle the HingeConstraint will allow if LimitsEnabled is true. Measured in degrees.
Thread safety | ReadSafe |
---|---|
Category | Limits |
Loaded/Saved | true |
History 4
- 553 Change Default of UpperAngle from to 45
- 486 Change ThreadSafety of UpperAngle from ReadOnly to ReadSafe
- 462 Change ThreadSafety of UpperAngle from to ReadOnly
- 241 Add UpperAngle