Constraint

constraint

A physics constraint that can be configured along 6 degrees of freedom. In its default state it behaves as a fixed constraint - that is, it rigidly fixes the constraint frames of its two entities. However, individual degrees of freedom may be unlocked to permit any combination of rotation around the x-, y- and z- axes, and translation along these axes.

Dependencies

Attributes

AttributeTypeDefaultDescription
motionAlongXinteger0Motion along the X axis
motionAlongYinteger0Motion along the Y axis
motionAlongZinteger0Motion along the Z axis
motionAroundXinteger0Motion around the X axis
motionAroundYinteger0Motion around the Y axis
motionAroundZinteger0Motion around the Z axis
motionLowerLimitvec3[ 0, 0, 0 ]The lower distance of the limit.
motionUpperLimitvec3[ 0, 0, 0 ]The upper distance of the limit.
motionLimitSpringStiffnessvec3[ 0, 0, 0 ]If greater than zero, the limit is soft, i.e. a spring pulls the joint back to the limit.
motionLimitSpringDampingvec3[ 0, 0, 0 ]If greater than zero, this is the damping of the limit spring.
swingLimitAnglevec2[ 0, 0 ]The limit angle from the Y-axis and the Z-axis of the constraint frame. The cone limit is used if either or both swing axes are limited. The extents are symmetrical and measured in the frame of the parent. If only one swing degree of freedom is limited, the corresponding value from the cone limit defines the limit range.
swingSpringStiffnessfloat0If greater than zero, the limit is soft, i.e. a spring pulls the joint back to the limit.
swingSpringDampingfloat0If greater than zero, this is the damping of the limit spring.
twistLimitAnglevec2[ 0, 0 ]The twist limit controls the range of motion around the twist axis. The limit angle range is (-360, 360).
twistSpringStiffnessfloat0If greater than zero, the limit is soft, i.e. a spring pulls the joint back to the limit.
twistSpringDampingfloat0If greater than zero, this is the damping of the limit spring.
linearDriveStiffnessvec3[ 0, 0, 0 ]If greater than zero, the limit is soft, i.e. a spring pulls the joint back to the limit.
linearDriveDampingvec3[ 0, 0, 0 ]If greater than zero, this is the damping of the limit spring.
linearDriveForceLimitvec3[ -1, -1, -1 ]The maximum impulse or force that can be exerted by the drive. -1 for no limit.
angularDriveStiffnessvec3[ 0, 0, 0 ]If greater than zero, the limit is soft, i.e. a spring pulls the joint back to the limit.
angularDriveDampingvec3[ 0, 0, 0 ]If greater than zero, this is the damping of the limit spring.
angularDriveForceLimitvec3[ -1, -1, -1 ]The maximum impulse or force that can be exerted by the drive. -1 for no limit.
driveTypeinteger1The drive type
driveLinearVelocityvec3[ 0, 0, 0 ]The goal velocity for linear drive.
driveAngularVelocityvec3[ 0, 0, 0 ]The goal velocity for angular drive.