Kinematics3DSystemOptions
Defined in: src/modules/kinematics-3d/kinematics3d-system.ts:37
Options for makeKinematics3DSystem, the 3D sibling of
makeKinematicsSystem.
The system iterates every entity carrying dynamicTag and all of
positionDef, velocityDef and ShapeAabb3Def — those are the “dynamic
bodies”. For each it applies gravity (clamped to terminalVelocity), then
resolves motion against the colliders yielded by broadphase.
Resolution is a three-pass axis-separated push-out — X, then Z, then Y — always pushing along the axis of shallowest penetration. That is the shortest way out and the only one that cannot tunnel; without it, a body overlapping a large thin wall is pushed out through the wall’s wide face, and a floor the body is resting on blocks its horizontal movement. Horizontal axes run before Y so a wall contact cannot cancel a jump on the same tick.
positionDef / velocityDef are injected because the engine has no
modules/transform-3d yet — the same shape as
makeFollowCameraSystem({ positionDef }). Nullary defaults belong here once
that module ships.
Type Parameters
Section titled “Type Parameters”TCtx extends Kinematics3DTickCtx
Properties
Section titled “Properties”broadphase
Section titled “broadphase”
readonlybroadphase: (ctx,box) =>Iterable<EntityId>
Defined in: src/modules/kinematics-3d/kinematics3d-system.ts:72
Yields candidate static ids that may overlap box — the axis-projected
target AABB (world-space, centre + half extents). The system re-tests every
candidate with aabb3VsAabb3 and filters by staticTag, so over-yielding
is safe (and typical for a spatial index). Called once per axis per body.
Parameters
Section titled “Parameters”TCtx
Returns
Section titled “Returns”Iterable<EntityId>
dynamicTag
Section titled “dynamicTag”
readonlydynamicTag:TagDef
Defined in: src/modules/kinematics-3d/kinematics3d-system.ts:40
Tag marking the bodies this system simulates.
gravity
Section titled “gravity”
readonlygravity:number
Defined in: src/modules/kinematics-3d/kinematics3d-system.ts:42
Downward acceleration in world-units per second², applied as -y.
readonlyoptionalname?:string
Defined in: src/modules/kinematics-3d/kinematics3d-system.ts:38
phase?
Section titled “phase?”
readonlyoptionalphase?:string
Defined in: src/modules/kinematics-3d/kinematics3d-system.ts:43
positionDef
Section titled “positionDef”
readonlypositionDef:ComponentDef<Vec3>
Defined in: src/modules/kinematics-3d/kinematics3d-system.ts:45
Position component to integrate, {x, y, z}.
runAfter?
Section titled “runAfter?”
readonlyoptionalrunAfter?: readonlystring[]
Defined in: src/modules/kinematics-3d/kinematics3d-system.ts:46
runBefore?
Section titled “runBefore?”
readonlyoptionalrunBefore?: readonlystring[]
Defined in: src/modules/kinematics-3d/kinematics3d-system.ts:47
staticTag?
Section titled “staticTag?”
readonlyoptionalstaticTag?:TagDef
Defined in: src/modules/kinematics-3d/kinematics3d-system.ts:55
Tag that identifies immovable obstacles. Supplying it makes the system skip any candidate that does not carry it, which is what makes over-yielding safe for a spatial-index broadphase. Omit it when the broadphase already yields exactly the colliders — a game whose candidate list also carries a movable body that should still block (portal’s resting cube).
stepHeight?
Section titled “stepHeight?”
readonlyoptionalstepHeight?:number
Defined in: src/modules/kinematics-3d/kinematics3d-system.ts:61
Maximum rise (world units) a grounded body auto-climbs instead of being blocked — the character-controller “step offset” (stairs). Omit to disable step-up entirely.
terminalVelocity
Section titled “terminalVelocity”
readonlyterminalVelocity:number
Defined in: src/modules/kinematics-3d/kinematics3d-system.ts:63
Maximum downward speed (the -vy cap).
velocityDef
Section titled “velocityDef”
readonlyvelocityDef:ComponentDef<{vx:number;vy:number;vz:number; }>
Defined in: src/modules/kinematics-3d/kinematics3d-system.ts:65
Velocity component to integrate, {vx, vy, vz}.