System: position¶
Position snapshot system.
Maintains prev_position as an immutable snapshot of all entity positions
at the start (or end) of a step. Other systems (e.g. portal teleportation,
trail generation, damage-on-crossing) rely on this historical information to
detect transitions or movement paths.
position_system(state, ctx)
¶
Snapshot current entity positions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state
|
State
|
Current immutable simulation state. |
required |
ctx
|
StepContext
|
Current step context. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
StepContext |
StepContext
|
Updated step context with snapshot of current positions. |