Skip to content

API Interface JointSettings

github-actions[bot] edited this page Nov 30, 2026 · 3 revisions

Interface: JointSettings

Defined in: src/plugins/physics/runtime/backend.ts:82

Limits, motor and spring on a live joint; radians for angles. Null parts are off.

Properties

cone?

readonly cone?: 
  | {
  swing: readonly [number, number];
  twist: readonly [number, number];
}
  | null;

Defined in: src/plugins/physics/runtime/backend.ts:92

A spherical joint's twist range (around its x axis) and swing half-angles around its y and z axes, in its frame. The cone is elliptical; a backend without an exact elliptical limit approximates it (ADR 0375).


drive?

readonly drive?: 
  | {
  damping: number;
  maxForce: number;
  rotation: PhysicsQuat;
  stiffness: number;
}
  | null;

Defined in: src/plugins/physics/runtime/backend.ts:98

A spherical joint's drive: turn towards rotation (the joint body's rotation relative to the connected body, away from its pose when the joint was made, in the joint frame) with stiffness torque per radian and damping torque per radian per second, at most maxForce torque. Null is off.


limits

readonly limits: readonly [number, number] | null;

Defined in: src/plugins/physics/runtime/backend.ts:83


motor

readonly motor: 
  | {
  maxForce: number;
  targetVelocity: number;
}
  | null;

Defined in: src/plugins/physics/runtime/backend.ts:85

Drive towards targetVelocity with at most maxForce.


spring

readonly spring: 
  | {
  damping: number;
  stiffness: number;
  target: number;
}
  | null;

Defined in: src/plugins/physics/runtime/backend.ts:87

Pull towards target with stiffness and damping. Ignored while a motor is on.

Clone this wiki locally