Go to file
Michael Mainguy 854f43ecf3
Some checks failed
Build / build (push) Failing after 34s
Fix status screen to follow camera using parenting
Changed status screen from manual position updates to automatic camera-following using parent-child relationship.

**Modified: src/statusScreen.ts**
- Removed Observer import (no longer needed)
- Removed _updateObserver property
- Modified initialize() method:
  - Parent _screenMesh to camera for automatic following
  - Set position to (0, 0, 2) in local space (2 meters forward)
  - Commented out rotation.y = Math.PI (not needed with proper texture orientation)
  - Set renderingGroupId to 3 for always-on-top rendering
- Simplified show() method:
  - Removed manual position/lookAt/rotate calculations
  - Just enable mesh and update statistics
  - Parenting handles all positioning automatically
- hide() method unchanged (already simple)

Benefits:
- Zero per-frame overhead (no render loop needed)
- Screen automatically follows camera movement in VR
- Matches existing architecture (scoreboard, sight use same pattern)
- Works in both desktop and VR
- Simpler, more maintainable code

The screen now properly follows the user's head movement and stays 2 meters in front of the camera at all times.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-08 03:47:50 -06:00
.github/workflows increased heap space. 2025-10-28 12:01:29 -05:00
docs Add Blender export tooling and refactor asset structure 2025-11-06 12:25:34 -06:00
public Fix inspector 'i' key registration in KeyboardInput 2025-11-07 13:07:15 -06:00
scripts Add Blender export tooling and refactor asset structure 2025-11-06 12:25:34 -06:00
server Initial Commit 2025-02-15 11:19:24 -06:00
src Fix status screen to follow camera using parenting 2025-11-08 03:47:50 -06:00
themes/default Fix level double initialization and refactor ship physics 2025-11-07 11:16:50 -06:00
.gitignore Initial Commit 2025-02-15 11:19:24 -06:00
CLAUDE.md Refactor sight to crosshair reticle and rename starfield to rockFactory 2025-10-30 10:21:27 -05:00
CONTROLLER_THRUST.md Refactor ship controls to force-based physics with world-space transformations 2025-10-31 11:20:31 -05:00
index.html Make ship physics constants configurable via GameConfig with UI 2025-11-07 13:05:27 -06:00
package-lock.json Add Blender export tooling and refactor asset structure 2025-11-06 12:25:34 -06:00
package.json Add Blender export tooling and refactor asset structure 2025-11-06 12:25:34 -06:00
styles.css Add difficulty levels and upgrade BabylonJS 2025-10-17 09:05:18 -05:00
tsconfig.json Initial Commit 2025-02-15 11:19:24 -06:00
vite.config.ts Add difficulty levels and upgrade BabylonJS 2025-10-17 09:05:18 -05:00