Liveries panel: clicks land on the vehicle as it is drawn (doors open) #478

Manually merged
github merged 1 commit from github-bot/gh-478 into gh-pr/478/base 2026-11-27 17:01:11 +00:00 AGit
Owner

@⁠holdmysocks on GitHub · 2026-11-27 16:47 UTC · original
holdmysocks:claude/livery-pick-doors → master · +127 −35 · 3 files · 1 commits · merged 2026-11-27 16:59 UTC

What

Clicks and drags in the Liveries panel now land on the vehicle as it is drawn (SIX-250). Until now the ray was tested against the model as stored, with everything shut: with the doors, bonnet or boot open, or a roof down, an open panel could not be clicked, and a click went to where the panel would be when shut.

  • The pick poses every mesh that carries sticker zones with the joint matrices the view draws with (the same weighted sum as the viewer's shader; a vertex without weights or a mesh that is not skinned stays where it is stored), and tests the ray against those places and their boxes.
  • The posed meshes are kept and made anew only when the model or a joint matrix changes, so hovering costs what it did before while nothing moves.
  • This covers "click panels on the model", dragging a sticker on the model, and the scripted --livery-click / --livery-drag.
  • The matrices are only worked out while the Liveries panel is open.

Checked

  • New unit test a_ray_finds_a_door_where_it_is_swung_to: a wall skinned to a joint and swung a quarter turn about its edge is found by a ray from the side at the right distance and UV, and no longer where it was; without matrices, or not skinned, it is where it is stored. cargo test -p sixng-gui: 58 pass.
  • Scripted on a car (phoenix) with the doors open (--door 1): a click on the open door's outer skin adds the door's zone (25) to the sticker and the sticker is drawn on the open door. The v0.12.0 viewer with the same click finds nothing there.
  • The same car with the doors shut and with them open: a click on the body gives the same zone as the v0.12.0 viewer in both.
  • cargo build --release -p sixng-gui without warnings.

Not decoded / not done

  • A click through a gap (a door opening, a window) still goes on to the next surface with zones behind it, also from its inside: meshes without sticker zones (the interior, glass) let the ray through, as before.
  • Tried with doors only. Bonnet, boot and a folding roof go through the same matrices but were not clicked.
  • Wheels and parts drawn by their own placement instead of a joint are not posed (they carry no sticker zones on the vehicles looked at).
  • Not tried by hand with a mouse; the scripted click runs the same code.
  • Screenshots are not attached (they show game assets); they were handed to the user directly.
**@⁠holdmysocks** on GitHub · 2026-11-27 16:47 UTC · [original](https://github.com/holdmysocks/SixNG/pull/478) `holdmysocks:claude/livery-pick-doors` → `master` · +127 −35 · 3 files · 1 commits · merged 2026-11-27 16:59 UTC ## What Clicks and drags in the Liveries panel now land on the vehicle as it is drawn (SIX-250). Until now the ray was tested against the model as stored, with everything shut: with the doors, bonnet or boot open, or a roof down, an open panel could not be clicked, and a click went to where the panel would be when shut. - The pick poses every mesh that carries sticker zones with the joint matrices the view draws with (the same weighted sum as the viewer's shader; a vertex without weights or a mesh that is not skinned stays where it is stored), and tests the ray against those places and their boxes. - The posed meshes are kept and made anew only when the model or a joint matrix changes, so hovering costs what it did before while nothing moves. - This covers "click panels on the model", dragging a sticker on the model, and the scripted `--livery-click` / `--livery-drag`. - The matrices are only worked out while the Liveries panel is open. ## Checked - New unit test `a_ray_finds_a_door_where_it_is_swung_to`: a wall skinned to a joint and swung a quarter turn about its edge is found by a ray from the side at the right distance and UV, and no longer where it was; without matrices, or not skinned, it is where it is stored. `cargo test -p sixng-gui`: 58 pass. - Scripted on a car (`phoenix`) with the doors open (`--door 1`): a click on the open door's outer skin adds the door's zone (25) to the sticker and the sticker is drawn on the open door. The v0.12.0 viewer with the same click finds nothing there. - The same car with the doors shut and with them open: a click on the body gives the same zone as the v0.12.0 viewer in both. - `cargo build --release -p sixng-gui` without warnings. ## Not decoded / not done - A click through a gap (a door opening, a window) still goes on to the next surface with zones behind it, also from its inside: meshes without sticker zones (the interior, glass) let the ray through, as before. - Tried with doors only. Bonnet, boot and a folding roof go through the same matrices but were not clicked. - Wheels and parts drawn by their own placement instead of a joint are not posed (they carry no sticker zones on the vehicles looked at). - Not tried by hand with a mouse; the scripted click runs the same code. - Screenshots are not attached (they show game assets); they were handed to the user directly.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 16:51:36 +00:00
github-bot changed target branch from master to gh-pr/478/base 2026-11-27 17:01:03 +00:00
github manually merged commit 338d12f25f into gh-pr/478/base 2026-11-27 17:01:11 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.