API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classWheelJoint

@codexo/exojs-physics / physics / stable

A wheel attached to a chassis: free to **spin** (no rotation lock) and sprung along a **suspension axis** (a soft spring), but locked **laterally** (it cannot slide perpendicular to the axis). Optionally driven by a rotation motor and/or bounded by a suspension-travel limit. Used for vehicles. Solved in the sub-step loop, warm-started.

12
props
0
methods
0
events
Import
import { WheelJoint } from '@codexo/exojs-physics'

A wheel attached to a chassis: free to **spin** (no rotation lock) and sprung along a **suspension axis** (a soft spring), but locked **laterally** (it cannot slide perpendicular to the axis). Optionally driven by a rotation motor and/or bounded by a suspension-travel limit. Used for vehicles. Solved in the sub-step loop, warm-started.

Constructors1
Properties12
collideConnected: boolean
Whether bodyA and bodyB also collide with each other; see JointOptions.collideConnected.
dampingRatio: number
Suspension spring damping ratio.
enabled: boolean
When false, the joint is skipped by the solver (but still tracked by the world).
enableLimit: boolean
When true, the axis translation is constrained to [lowerTranslation, upperTranslation].
enableMotor: boolean
When true, the motor drives the wheel's spin toward motorSpeed.
hertz: number
Suspension spring frequency in Hz (0 = rigid axis).
lowerTranslation: number
Lower suspension-travel limit along the axis.
maxMotorTorque: number
Maximum motor torque.
motorSpeed: number
Target relative angular velocity (rad/s) for the motor.
upperTranslation: number
Upper suspension-travel limit along the axis.
Source