Expand description
Movement and collision against sector geometry (Build clipmove / getzrange
equivalents, written from scratch).
The mover is a vertical cylinder: radius r (xy units), feet at z, extending
height z units upward. A portal wall blocks when the step into the next sector is
higher than step, when the head would hit its ceiling, or when the wall’s blocking
flag is set.
Structs§
- Circle
Obstacle - Circle obstacle (blocking sprite) for collision.
- HitCylinder
- Vertical cylinder that can be hit by traces (dudes, things…).
- Mover
- Trace
Hit
Enums§
Constants§
Functions§
- clip_
move - Moves (x, y) by (dx, dy) with sliding collision. Returns the new position, sector and the first obstacle touched.
- closest_
on_ 🔒seg - find_
sector_ near - Sector lookup preferring neighbours of
hint(breadth-first over a few levels). - get_
z_ range - Highest floor and lowest ceiling under a cylinder of
radiusat (x, y). Returns(ceil_z, ceil_sector, floor_z, floor_sector). - hitscan
- 3D hitscan. Direction: unit xy vector
(dx, dy)anddzz units per xy unit. - nearby_
sectors - Collects sectors reachable through portals whose walls come within
reachof (x, y). - wall_
blocks - True if wall
wi(seen from its own sector) blocks a mover with feet atz.