Files
horizon-airdef/crates
chexit 2bcce64236 Project world points through the last drawn frame's camera (#132)
render.project (API level 31) returns where a world point lands on the
screen, in GUI pixels, through the camera the last drawn frame used:
the player's own view or a mod's set-main-view camera, the bob and the
spin included, at most a frame behind. None for a point behind the
camera, and with no world or drawn frame yet; a point off the screen
still projects past its edges, for the caller to clip.

The game copies the frame's eye and view-projection into the mod
snapshot after a world frame is drawn, and clears it when another world
is entered, so a stale camera never projects into the new one. The
projection is camera-relative, as the world's geometry is drawn, with
the renderer's own f32 precision far from the origin.

For AirDef's world overlay: square markers over visible targets while
a key is held, on top of normal gameplay. The UI test guest calls the
new function so the sandbox checks the level-31 contract.

Co-Authored-By: Kimi Code <noreply@moonshot.ai>
2026-11-20 23:54:29 +03:00
..