Small fixes: sandbox collision, fall recovery, stale config, README drift, dead code #21

Open
opened 2026-10-25 08:46:45 +00:00 by hiccup444 · 0 comments

Type: cleanup Priority: low

Each item is small and independent. Checked against main at 76b3851.

  • Sandbox props have no collision. In levels/sandbox/sandbox.tscn:83-102, Crate1, Crate2, Pillar, Wall and Barrel are bare MeshInstance3D nodes. Only Ground (:70) has a body. The player walks straight through the wall and the pillar, so the sandbox can't exercise XR Tools' collision handling (the player body sliding along walls). Give each prop a StaticBody3D with a matching CollisionShape3D, or rebuild them as CSG with use_collision = true.

  • No recovery from falling off the world. The ground is a 40 x 40 m box (sandbox.tscn:20-24) with nothing past its edge. Walk off it and the body falls until the player goes back to the main menu or loads a save. (PlayerRig._reset_motion(), src/player/player_rig.gd:112, exists precisely because of the fall-velocity bug this produced on 2026-10-22.) A per-level kill height fixes it: add a _physics_process to Game that re-places the player at spawn_point() (src/levels/level.gd:33) once they drop below the level's kill Y. Alternatively, put an Area3D floor under the level that does the same.

  • Stale renderer keys in project.godot. driver/driver_name.windows="vulkan" and driver/driver_name.linuxbsd="vulkan" (project.godot:40-41) are not Godot 4.6 settings, and the project renders with Compatibility anyway. Addressed in PR #15.

  • Settings save errors are ignored. GameSettings.save_to_disk() discards the return value of cfg.save(path) (src/core/game_settings.gd:46). Check it and push_warning, so a read-only or full user directory doesn't silently lose settings.

  • RigInput.is_steamvr() re-queries the runtime several times per frame. It calls XRServer.find_interface() and get_system_info() (src/input/generic/rig_input.gd:98-105), and it runs once from _process (:115) and again from _on_backend_state for each hand (:136 and :138, so twice for the left hand). Its comment (:96-97) says it can't be cached at boot because system info only arrives after XR starts. Cache it the first time the runtime name comes back non-empty instead.

  • Dead code. src/player/hand_view.gd (class_name HandView) is not used by any scene or script on main: ArmsView replaced it on the rig in ef1a69c, and only comments still mention it. The pipeline that fed it, tools/export_hands.py and assets/player/hands/README.md (plus the .gitignore entries for its output, .gitignore:36-39), produces per-hand GLBs that only HandView loads (hand_view.gd:46). Retire them together, or mark them as kept for a future separate-hands model. The script also has two leftovers: it builds a src matrix it never uses (tools/export_hands.py:111), and the line it prints as a "det check" (:121) only prints the wrist position; no determinant is ever computed.

  • README drift. README.md has fallen behind the code in several places:

    • "Continue is present but disabled until save/load lands" (README.md:18-19): save/load landed in #8, and Continue now enables whenever a save exists.
    • "Godot editor plugins land here later (godot-xr-tools decision still open)" (README.md:76-77): XR Tools is vendored in addons/godot-xr-tools, and addons/da_debug_bridge lives there too.
    • The Layout list (README.md:67-80) is missing assets/, docs/, levels/, scenes/, src/input/, src/levels/, tests/ and tools/.
    • It points at a single headless check, tests/smoke_menu.gd (README.md:22-23). CI now runs seven suites on main (.forgejo/workflows/tests.yml:43), and lists terrain_check for when #7 lands.
    • The arms model being "overridable by any pack" (README.md:63-64) does not hold for a raw .glb in a .zip. Addressed in PR #18.
**Type:** cleanup **Priority:** low Each item is small and independent. Checked against `main` at `76b3851`. - [ ] **Sandbox props have no collision.** In `levels/sandbox/sandbox.tscn:83-102`, `Crate1`, `Crate2`, `Pillar`, `Wall` and `Barrel` are bare `MeshInstance3D` nodes. Only `Ground` (`:70`) has a body. The player walks straight through the wall and the pillar, so the sandbox can't exercise XR Tools' collision handling (the player body sliding along walls). Give each prop a `StaticBody3D` with a matching `CollisionShape3D`, or rebuild them as CSG with `use_collision = true`. - [ ] **No recovery from falling off the world.** The ground is a 40 x 40 m box (`sandbox.tscn:20-24`) with nothing past its edge. Walk off it and the body falls until the player goes back to the main menu or loads a save. (`PlayerRig._reset_motion()`, `src/player/player_rig.gd:112`, exists precisely because of the fall-velocity bug this produced on 2026-10-22.) A per-level kill height fixes it: add a `_physics_process` to `Game` that re-places the player at `spawn_point()` (`src/levels/level.gd:33`) once they drop below the level's kill Y. Alternatively, put an `Area3D` floor under the level that does the same. - [ ] **Stale renderer keys in `project.godot`.** `driver/driver_name.windows="vulkan"` and `driver/driver_name.linuxbsd="vulkan"` (`project.godot:40-41`) are not Godot 4.6 settings, and the project renders with Compatibility anyway. Addressed in PR #15. - [ ] **Settings save errors are ignored.** `GameSettings.save_to_disk()` discards the return value of `cfg.save(path)` (`src/core/game_settings.gd:46`). Check it and `push_warning`, so a read-only or full user directory doesn't silently lose settings. - [ ] **`RigInput.is_steamvr()` re-queries the runtime several times per frame.** It calls `XRServer.find_interface()` and `get_system_info()` (`src/input/generic/rig_input.gd:98-105`), and it runs once from `_process` (`:115`) and again from `_on_backend_state` for each hand (`:136` and `:138`, so twice for the left hand). Its comment (`:96-97`) says it can't be cached at boot because system info only arrives after XR starts. Cache it the first time the runtime name comes back non-empty instead. - [ ] **Dead code.** `src/player/hand_view.gd` (`class_name HandView`) is not used by any scene or script on `main`: `ArmsView` replaced it on the rig in `ef1a69c`, and only comments still mention it. The pipeline that fed it, `tools/export_hands.py` and `assets/player/hands/README.md` (plus the `.gitignore` entries for its output, `.gitignore:36-39`), produces per-hand GLBs that only `HandView` loads (`hand_view.gd:46`). Retire them together, or mark them as kept for a future separate-hands model. The script also has two leftovers: it builds a `src` matrix it never uses (`tools/export_hands.py:111`), and the line it prints as a "det check" (`:121`) only prints the wrist position; no determinant is ever computed. - [ ] **README drift.** `README.md` has fallen behind the code in several places: - "Continue is present but disabled until save/load lands" (`README.md:18-19`): save/load landed in #8, and Continue now enables whenever a save exists. - "Godot *editor* plugins land here later (godot-xr-tools decision still open)" (`README.md:76-77`): XR Tools is vendored in `addons/godot-xr-tools`, and `addons/da_debug_bridge` lives there too. - The Layout list (`README.md:67-80`) is missing `assets/`, `docs/`, `levels/`, `scenes/`, `src/input/`, `src/levels/`, `tests/` and `tools/`. - It points at a single headless check, `tests/smoke_menu.gd` (`README.md:22-23`). CI now runs seven suites on `main` (`.forgejo/workflows/tests.yml:43`), and lists `terrain_check` for when #7 lands. - The arms model being "overridable by any pack" (`README.md:63-64`) does not hold for a raw `.glb` in a `.zip`. Addressed in PR #18.
Sign in to join this conversation.
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
dead-air/engine#21
No description provided.