physx-joint-constraint
Adds a constraint to a physx-joint. Supported joints are D6, Revolute and Prismatic. Can only be used on an entity with the physx-joint component. Requires scene-options: physics.
This is the schema for PhysX Joint Constraint, the properties of object physx-joint-constraint.
PhysX Joint Constraint Attributes
| Attribute | Type | Default | Description | Required |
|---|---|---|---|---|
| lockedAxes | array | [] |
[D6] Which axes are explicitly locked by this constraint and can’t be moved at all. Should be some combination of x, y, z, twist, swing. | No |
| constrainedAxes | array | [] |
[D6] Which axes are constrained by this constraint. These axes can be moved within the set limits. Should be some combination of x, y, z, twist, swing. | No |
| freeAxes | array | [] |
[D6] Which axes are explicitly freed by this constraint. These axes will not obey any limits set here. Should be some combination of x, y, z, twist, swing. | No |
| linearLimit | vector2 | [D6, Prismatic] Limit on linear movement. Only affects x, y, and z axes. First component is the minimum allowed position. | No | |
| angularLimit | vector2 | [Revolute] Limit on angular movement in degrees. First component is the minimum allowed angle, second is the maximum. | No | |
| limitCone | vector2 | [D6] Two angles in degrees specifying a cone in which the joint is allowed to swing, like a pendulum. | No | |
| twistLimit | vector2 | [D6] Minimum and maximum angles in degrees that the joint is allowed to twist. | No | |
| damping | number | 0 |
[All] Spring damping for soft constraints. | No |
| restitution | number | 0 |
[All] Spring restitution for soft constraints. | No |
| stiffness | number | 0 |
[All] If greater than 0, will make this joint a soft constraint, and use a spring force model. | No |