pub struct Body {
pub width: f64,
pub height: f64,
}Expand description
A body’s standing collision box: width × height × width, centred
horizontally on the body’s position and rising from its feet.
It lives here for the reason step_allowed does. Three consumers ask the
same geometric question of the same object class — the routing model asks
which cells a walker may occupy beside a killing volume, the posted-place
proof asks whether a body seated at a declared cell is inside one, and the
emitter formats the runtime selector that decides both at play time — and a
question with three answers is a question three gates can disagree about.
The disagreement was not hypothetical: every proof reasoned in whole cells
while the runtime selected on hitbox intersection, so the engine routed a
player along a cell whose occupant the volume kills, chose that same cell as
the “safe” lip a stake stands on, and reported both green.
Fields§
§width: f64Collision-box width and depth, in blocks.
height: f64Collision-box height, in blocks.