integrateBody

function integrateBody
rigidBody.ts:36
integrateBody(state: BodyState, linearAcceleration: Vec3, angularAcceleration: Vec3, dt: number) → BodyState

Advance a body by one fixed step.

Semi-implicit (symplectic) Euler: velocity first, then position from the new velocity. Explicit Euler pumps energy into every orbit — a ship left coasting would slowly climb out of a gravity well — and that failure is invisible for minutes and obvious after an hour of time warp. The cost of the better integrator is one line.

linearAcceleration is in frame axes; angularAcceleration is in body axes, because torque comes from thrusters bolted to the hull.

stateBodyState
Undocumented
linearAccelerationVec3
Undocumented
angularAccelerationVec3
Undocumented
dtnumber
Undocumented
ReturnsBodyState