Skip to main content

Constraint

@3dverse/livelink v0.8.10


@3dverse/livelink / Components / Constraint

Type Alias: Constraint

Constraint: object

Defined in: node_modules/@3dverse/livelink.core/dist/_prebuild/engine_types/components.d.ts:193

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.

Type declaration

motionAlongX

motionAlongX: Int32

Motion along the X axis

Default Value

0;

motionAlongY

motionAlongY: Int32

Motion along the Y axis

Default Value

0;

motionAlongZ

motionAlongZ: Int32

Motion along the Z axis

Default Value

0;

motionAroundX

motionAroundX: Int32

Motion around the X axis

Default Value

0;

motionAroundY

motionAroundY: Int32

Motion around the Y axis

Default Value

0;

motionAroundZ

motionAroundZ: Int32

Motion around the Z axis

Default Value

0;

motionLowerLimit

motionLowerLimit: Vec3

The lower distance of the limit.

Default Value

0, 0, 0;

motionUpperLimit

motionUpperLimit: Vec3

The upper distance of the limit.

Default Value

0, 0, 0;

motionLimitSpringStiffness

motionLimitSpringStiffness: Vec3

If greater than zero, the limit is soft, i.e. a spring pulls the joint back to the limit.

Default Value

0, 0, 0;

motionLimitSpringDamping

motionLimitSpringDamping: Vec3

If greater than zero, this is the damping of the limit spring.

Default Value

0, 0, 0;

swingLimitAngle

swingLimitAngle: Vec2

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.

Default Value

0, 0;

swingSpringStiffness

swingSpringStiffness: Float

If greater than zero, the limit is soft, i.e. a spring pulls the joint back to the limit.

Default Value

0;

swingSpringDamping

swingSpringDamping: Float

If greater than zero, this is the damping of the limit spring.

Default Value

0;

twistLimitAngle

twistLimitAngle: Vec2

The twist limit controls the range of motion around the twist axis. The limit angle range is (-360, 360).

Default Value

0, 0;

twistSpringStiffness

twistSpringStiffness: Float

If greater than zero, the limit is soft, i.e. a spring pulls the joint back to the limit.

Default Value

0;

twistSpringDamping

twistSpringDamping: Float

If greater than zero, this is the damping of the limit spring.

Default Value

0;

linearDriveStiffness

linearDriveStiffness: Vec3

If greater than zero, the limit is soft, i.e. a spring pulls the joint back to the limit.

Default Value

0, 0, 0;

linearDriveDamping

linearDriveDamping: Vec3

If greater than zero, this is the damping of the limit spring.

Default Value

0, 0, 0;

linearDriveForceLimit

linearDriveForceLimit: Vec3

The maximum impulse or force that can be exerted by the drive. -1 for no limit.

Default Value

-1, -1, -1;

angularDriveStiffness

angularDriveStiffness: Vec3

If greater than zero, the limit is soft, i.e. a spring pulls the joint back to the limit.

Default Value

0, 0, 0;

angularDriveDamping

angularDriveDamping: Vec3

If greater than zero, this is the damping of the limit spring.

Default Value

0, 0, 0;

angularDriveForceLimit

angularDriveForceLimit: Vec3

The maximum impulse or force that can be exerted by the drive. -1 for no limit.

Default Value

-1, -1, -1;

driveType

driveType: Int8

The drive type

Default Value

1;

driveLinearVelocity

driveLinearVelocity: Vec3

The goal velocity for linear drive.

Default Value

0, 0, 0;

driveAngularVelocity

driveAngularVelocity: Vec3

The goal velocity for angular drive.

Default Value

0, 0, 0;