Add reticle + target/held item highlight #38

Merged
scruffydude merged 1 commit from task/37-reticle-highlight into main 2026-10-03 18:46:55 -04:00
Owner

Adds a small always-visible centered reticle dot, and tints items while aimed-at (pale yellow) or held (bright white).

Real bug caught while building this: RigidBody3D/Node3D have no modulate property - a CanvasItem (2D) concept mistakenly carried over in the initial port. Fixed via a new item.gd::set_tint() using material_override on the item's own MeshInstance3D, so items sharing a base material (soon, once item sets land) won't all tint together.

Verified headlessly: aim/look-away/pickup/drop all apply and clear the correct tint at each transition.

Closes #37

Adds a small always-visible centered reticle dot, and tints items while aimed-at (pale yellow) or held (bright white). Real bug caught while building this: `RigidBody3D`/`Node3D` have no `modulate` property - a `CanvasItem` (2D) concept mistakenly carried over in the initial port. Fixed via a new `item.gd::set_tint()` using `material_override` on the item's own `MeshInstance3D`, so items sharing a base material (soon, once item sets land) won't all tint together. Verified headlessly: aim/look-away/pickup/drop all apply and clear the correct tint at each transition. Closes #37
Playtest feedback on 0.8.0: no visual indicator of what's being aimed
at or held. Adds a small always-visible centered reticle dot to
player.tscn's UI, and tints items while aimed-at (pale yellow) or
held (bright white) - resetting to normal when no longer targeted or
after a drop.

Real bug caught while building this: RigidBody3D/Node3D have no
modulate property at all - that's a CanvasItem (2D) concept carried
over by mistake from the 2D version's item.gd. 3D tinting instead
goes through item.gd's new set_tint() method, which applies a
material_override to the item's own MeshInstance3D rather than
touching the shared base material - items of the same type (soon to
share mesh/material resources once sets land) won't all tint
together when only one is targeted/held. player.gd calls set_tint()
via a has_method() check, consistent with the existing try_snap()
guard, keeping the carry system generic.

Verified headlessly: aiming at an item applies the highlight tint and
tracks it; looking away resets the tint and clears tracking; picking
up switches cleanly to the held tint without the highlight logic
fighting it; dropping resets to normal.

Closes #37

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
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
scruffydude/project-awry!38
No description provided.