What a body is made of and how it behaves: the shape, how it moves, its mass, surface and layers. Fill one in and give it to ; the same description can make
any number of bodies. Where the body is comes from its entity's transform (its scale is applied to the shape).
A walking character: a capsule that slides along walls, climbs stairs and slopes, sticks to the ground going down and stands on moving platforms, without being a rigid body
(Jolt's CharacterVirtual). Make one with ; it moves in every fixed step toward , and its entity's
transform (the feet) follows, blended between steps like a dynamic body's. Dynamic bodies are pushed by it and do not push it.
A hitch on a vehicle: a point on its body where an attachment or a trailer is attached. The hitch is an entity under the vehicle's, whose transform is the hitch's frame in the vehicle's
space; takes the attachment's entity and the attach point in the attachment's space, which meets the hitch's frame. Make one with
. A hitch holds one body at a time; the pair do not collide while hitched.
Which bodies collide with which. A body has , the collision layers it belongs to (a bit each), and , the layers it collides with;
two bodies collide when each is in a layer the other's mask holds. There are 14 layers for the game (bits 0 to 13). The native layer keeps two more bits of its own to sort bodies into the
broad phase (static, sensor, moving); static bodies never collide with each other. See Native/jolt/apogee_jolt.h.
A collision shape: an immutable thing a body (or another shape) is made of, in the body's local space. Made with the static functions, given to ,
and shared freely: many bodies can use one. Jolt counts references, so a shape that a script lets go of lives on in the bodies that use it.
The physics simulation of one ECS : Jolt Physics with double-precision positions, stepped at a fixed rate. Entities get a with
; a dynamic body's entity follows the simulation (its is written, local to its parent, so the world's transform system
then fills in the ), and a kinematic body follows its entity.
A vehicle on a dynamic body: wheels with suspension and tires, or tracks, an engine and a clutch (Jolt's VehicleConstraint). The game owns the gearbox: it sets
(the signed overall ratio it wants, 0 for neutral) and in the signal, which runs before each physics step, together with the
driver's inputs, and the vehicle gives them to Jolt. Make one with .
One wheel of a vehicle. The vehicle's space has +Z forward, +Y up and +X to its left (glTF's). Its is where the wheel's center sits with its suspension fully extended:
the suspension reaches above that, and the wheel rests somewhere in that travel under the load.
An entity that has a body in the physics world (). Removing it, or destroying the entity, removes the body. The fields are for tools and
inspectors; code asks the world ().