benilla-re systems structs docs

s_particleCameraDistance

global · models

Address
0xcf58e8 · 4 bytes, up to 0xcf58eb
Type
float
Meaning
Holds the distance from the last updated emitter to the camera
Confidence
verified, proof one
Finding
models/particles#update

Finding: Update in models: particles

Update(dt, matrix, camera, frame) stores the distance from the emitter's position to the camera in a global for the spawn rate, keeps the last position, sets the frame of the emitter and its children, and with |dt| < 2.384186e-7 only sets its flag 0x80. With flag 0x40000 it derives its displacement this frame scaled by clamp(|d|/dt · a + b, 0, 1). With flag 0x400 it accumulates time and, past 1/30 s, derives a velocity from its motion. It then advances, and places model particles.

The derivation is in the doc.