TorsionSpringConstraint

非推奨を表示

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.

概要

プロパティ

  • 並列読み取り

    The number of coils visualized for the constraint.

  • 読み取り専用
    複製されていません
    並列読み取り

    The current angle, in degrees, of the limiting cone.

  • 並列読み取り

    Damping constant for the TorsionSpringConstraint. Multiplied to the velocity of the constraint's Attachments to reduce the spring force applied.

  • 並列読み取り

    Limits the relative angular motion of the secondary axes of attachments through a cone constraint.

  • 並列読み取り

    The maximum angle of the constraint's limiting cone.

  • 並列読み取り

    The maximum allowable torque provided by the torsion spring.

  • 並列読み取り

    The visualization radius of the spring.

  • 並列読み取り

    The restitution coefficient of the cone constraint.

  • 並列読み取り

    The torsional stiffness of the spring.

Constraint から継承した プロパティ

プロパティ

Coils

並列読み取り

This property indicates the number of spring coils for visualization. Default value is 8.

CurrentAngle

読み取り専用
複製されていません
並列読み取り

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.

Damping

並列読み取り

Damping constant for the TorsionSpringConstraint. Multiplied to the velocity of the constraint's Attachments to reduce the spring force applied.

LimitsEnabled

並列読み取り

This property, when enabled, limits the relative angular motion of the secondary axes of attachments through a cone constraint. The default value is false.

MaxAngle

並列読み取り

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.

MaxTorque

並列読み取り

This property determines the maximum torque supported by the torsion spring. Defaults to 1000.

Radius

並列読み取り

This property indicates the visualization radius of the spring, in studs. Default value is 0.4.

Restitution

並列読み取り

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.

Stiffness

並列読み取り

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.

方法

イベント