fix(gizmo): draw the prim editing handles again, and make them clickable #311

Closed
cartopolis-agent wants to merge 0 commits from fix/gizmo-render-and-hit-test into main
Collaborator

Requested by Jeroen · project thread

What

Selecting a prim shows the move / rotate / scale handles again, and clicking a handle grabs it.

  • Handles were never drawn. Since the Bevy 0.19 upgrade bevy_gizmos is only the immediate-mode API; drawing needs bevy_gizmos_render, which the workspace never enabled. Every Gizmos call was accepted and dropped, silently. Added the feature to the workspace bevy features.
  • Handles were measured in the wrong frame. The click test and the drag read the prim's Transform (an offset inside its big_space grid cell) while the camera projects render space, so they only lined up when prim and camera shared a cell. Both now go through handle_frame, which reads the GlobalTransform the drawing reads; the drag projects from the render-space origin captured at press.
  • --ui gizmo / gizmorotate / gizmoscale seeds a selected prim in front of the camera through its geo anchor (so it is gridded like a server prim) and reports gizmo_render, gizmo_selected, gizmo_axes_hit in --dump-state.

Verified

  • cargo test --locked -p cartopolis --lib: 1292 passed, 0 failed.
  • Headless capture on vps-1 (lavapipe), Groningen at 25 m, --ui gizmo --expect 'gizmo_render==true' --expect 'gizmo_selected>=1' --expect 'gizmo_axes_hit>=3': all held (gizmo_render=true, gizmo_selected=1, gizmo_axes_hit=3). The PNG shows the red, green and blue translate arrows on the selected prim. Colour is not evidence on the software renderer; placement and visibility are.

Not tested on a phone or a real GPU, and rotate/scale modes were not captured.

🤖 Generated with Claude Code

<!-- claude-projects-attribution --> _Requested by **Jeroen** · [project thread](https://claude.ai/code/project/chan_01TwmfjopYLzNTiHrrakgxkY?thread=cmsg_01TwmfjopYLzNTiHrrakgxkYDBWUScp9e6pmLdkhU57i5q)_ ## What Selecting a prim shows the move / rotate / scale handles again, and clicking a handle grabs it. - **Handles were never drawn.** Since the Bevy 0.19 upgrade `bevy_gizmos` is only the immediate-mode API; drawing needs `bevy_gizmos_render`, which the workspace never enabled. Every `Gizmos` call was accepted and dropped, silently. Added the feature to the workspace `bevy` features. - **Handles were measured in the wrong frame.** The click test and the drag read the prim's `Transform` (an offset inside its big_space grid cell) while the camera projects render space, so they only lined up when prim and camera shared a cell. Both now go through `handle_frame`, which reads the `GlobalTransform` the drawing reads; the drag projects from the render-space origin captured at press. - **`--ui gizmo` / `gizmorotate` / `gizmoscale`** seeds a selected prim in front of the camera through its geo anchor (so it is gridded like a server prim) and reports `gizmo_render`, `gizmo_selected`, `gizmo_axes_hit` in `--dump-state`. ## Verified - `cargo test --locked -p cartopolis --lib`: 1292 passed, 0 failed. - Headless capture on vps-1 (lavapipe), Groningen at 25 m, `--ui gizmo --expect 'gizmo_render==true' --expect 'gizmo_selected>=1' --expect 'gizmo_axes_hit>=3'`: all held (`gizmo_render=true`, `gizmo_selected=1`, `gizmo_axes_hit=3`). The PNG shows the red, green and blue translate arrows on the selected prim. Colour is not evidence on the software renderer; placement and visibility are. Not tested on a phone or a real GPU, and rotate/scale modes were not captured. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
cartopolis-agent force-pushed fix/gizmo-render-and-hit-test from 991fe8d640
All checks were successful
CI / test cartopolis (pull_request) Successful in 12m59s
CI / wasm & android targets (pull_request) Has been skipped
to b8b7d2497f
All checks were successful
CI / test cartopolis (pull_request) Successful in 19m55s
CI / wasm & android targets (pull_request) Has been skipped
2026-10-09 06:32:15 +00:00
Compare
cartopolis-agent force-pushed fix/gizmo-render-and-hit-test from b8b7d2497f
All checks were successful
CI / test cartopolis (pull_request) Successful in 19m55s
CI / wasm & android targets (pull_request) Has been skipped
to 8126f23393
All checks were successful
CI / test cartopolis (pull_request) Successful in 13m9s
CI / wasm & android targets (pull_request) Has been skipped
CI / test cartopolis (push) Successful in 19m16s
CI / wasm & android targets (push) Successful in 3m41s
2026-10-09 07:06:11 +00:00
Compare
jeroen closed this pull request 2026-10-13 19:18:23 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jeroen/cartopolis!311
No description provided.