TorsionSpringConstraint
A rotational spring that opposes the angular motion between two axes.
Memory category | PhysicsParts |
---|
Member index 10
Description
A TorsionSpringConstraint applies a torque based on a relative angle and a relative angular velocity. Specifically, torsion springs try to bring two axes from two parts together in a compliant way.
Correct orientation of a torsion spring's attachments is important. The constraint will attempt to bring the SecondaryAxis of each attachment into alignment. When building mechanisms like swinging doors, ensure that the secondary axes are perpendicular to the intended axis of rotation.
When configuring this constraint, it may be helpful to study Roblox Units to understand how Roblox units compare to metric units.
Damping
The Damping value controls how fast the spring's oscillation dies down. A value of 0 allows the spring to oscillate endlessly, while higher values bring the spring to a rest more quickly.
Stiffness
Stiffness sets the torsional strength of the spring. Higher values create a spring that responds with more force.
Limits
Enabling the LimitsEnabled property exposes the MaxAngle value to restrict the spring's range within a cone; it also exposes the Restitution value which defines the elasticity of the attachments when they reach their limit.
History 34
- 553 Change Default of Stiffness from to 100
- 553 Change Default of Restitution from to 0
- 553 Change Default of Radius from to 0.400000006
- 553 Change Default of MaxTorque from to INF
- 553 Change Default of MaxAngle from to 45
- 553 Change Default of LimitsEnabled from to false
- 553 Change Default of from to false
- 553 Change PreferredDescriptor of from to LimitsEnabled
- 553 Change Default of Damping from to 0.00999999978
- 553 Change Default of CurrentAngle from to 0
- 553 Change Default of Coils from to 8
- 486 Change ThreadSafety of Stiffness from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Restitution from ReadOnly to ReadSafe
- 486 Change Category of Restitution from Limit to Limits
- 486 Change ThreadSafety of Radius from ReadOnly to ReadSafe
- 486 Change ThreadSafety of MaxTorque from ReadOnly to ReadSafe
- 486 Change ThreadSafety of MaxAngle from ReadOnly to ReadSafe
- 486 Change Category of MaxAngle from Limit to Limits
- 486 Add LimitsEnabled
- 486 Change ThreadSafety of from ReadOnly to ReadSafe
- 486 Change Tags of from [] to [Hidden, Deprecated]
- 486 Change ThreadSafety of Damping from ReadOnly to ReadSafe
- 486 Change ThreadSafety of CurrentAngle from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Coils from ReadOnly to ReadSafe
- 470 Add Stiffness
- 470 Add Restitution
- 470 Add Radius
- 470 Add MaxTorque
- 470 Add MaxAngle
- 470 Add
- 470 Add Damping
- 470 Add CurrentAngle
- 470 Add Coils
- 470 Add TorsionSpringConstraint
Members 10
Coils
Type | Default | |
---|---|---|
float | 8 |
This property indicates the number of spring coils for visualization. Default value is 8.
Thread safety | ReadSafe |
---|---|
Category | Appearance |
Loaded/Saved | true |
CurrentAngle
Type | Default | |
---|---|---|
float | 0 |
The current angle, in degrees, of the torsion spring's limiting cone. The limiting cone is formed at the position of the constraint's Attachment0 around its secondary axis with an angle equal to MaxAngle.
Thread safety | ReadSafe |
---|---|
Category | Derived |
Loaded/Saved | false/true |
History 3
- 553 Change Default of CurrentAngle from to 0
- 486 Change ThreadSafety of CurrentAngle from ReadOnly to ReadSafe
- 470 Add CurrentAngle
Damping
Type | Default | |
---|---|---|
float | 0.00999999978 |
Damping constant for the TorsionSpringConstraint. Multiplied to the velocity of the constraint's Attachments to reduce the spring force applied.
Thread safety | ReadSafe |
---|---|
Category | Spring |
Loaded/Saved | true |
LimitsEnabled
Type | Default | |
---|---|---|
bool | false |
This property, when enabled, limits the relative angular motion of the secondary axes of attachments through a cone constraint. The default value is false.
Thread safety | ReadSafe |
---|---|
Category | Spring |
Loaded/Saved | true |
History 2
- 553 Change Default of LimitsEnabled from to false
- 486 Add LimitsEnabled
MaxAngle
Type | Default | |
---|---|---|
float | 45 |
This property determines the maximum angle (in degrees) of the torsion spring's limiting cone. The limiting cone is formed at the position of the constraint's Attachment0 around its secondary axis with an angle equal to MaxAngle. Default value is 45 degrees.
Thread safety | ReadSafe |
---|---|
Category | Limits |
Loaded/Saved | true |
MaxTorque
Type | Default | |
---|---|---|
float | INF |
This property determines the maximum torque supported by the torsion spring. Defaults to 1000.
Thread safety | ReadSafe |
---|---|
Category | Spring |
Loaded/Saved | true |
Radius
Type | Default | |
---|---|---|
float | 0.400000006 |
This property indicates the visualization radius of the spring, in studs. Default value is 0.4.
Thread safety | ReadSafe |
---|---|
Category | Appearance |
Loaded/Saved | true |
Restitution
Type | Default | |
---|---|---|
float | 0 |
This property defines how elastic Attachments connected by a TorsionSpringConstraint are when they reach the end of the range specified by MaxAngle, when LimitEnabled is true. The value defaults to 0 and can be any floating number within the range of 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
- 486 Change Category of Restitution from Limit to Limits
- 470 Add Restitution
Stiffness
Type | Default | |
---|---|---|
float | 100 |
In the absence of damping, this property is proportional to the opposing torque of the spring. For instance, higher stiffness results in a larger opposing torque, and smaller stiffness results in a smaller opposing torque. The larger the torque value, the faster the axes are pushed together when the relative angle is positive (or away from each other if the relative angle is negative). The value defaults to 100.
Thread safety | ReadSafe |
---|---|
Category | Spring |
Loaded/Saved | true |