Skip to content

4b - Chest lids on XRI: VrHinge replaces the interim lid toggle - #433

Merged
JaXt0r merged 3 commits into
engine/hvr-replacementfrom
engine/hvr-replacement-4b
Oct 25, 2026
Merged

JaXt0r merged 3 commits into
engine/hvr-replacementfrom
engine/hvr-replacement-4b

Conversation

@JaXt0r

@JaXt0r JaXt0r commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Merge order: 1a → 1b → 1c → 1d → 2a → 2b → 3a → 3b → 3c → 4a → 4b → 4c, all into engine/hvr-replacement (no stacking). Each branch still contains the commits of the earlier steps, so after the earlier PR is merged the diff of this one shrinks to its own step. Plan: Docs/HVR-replacement/.

Description

Phase 4b: chest lids on the Xri backend (needs 4a).

  • oCMobContainer.prefab lid (UnityMCP): VrHinge (axis X, 0-110°) + GothicGrabInteractable (saved disabled, enabled by XriInteractableBridge on Xri) instead of XRSimpleInteractable + the interim VrChestLidToggle (deleted). HVR parts unchanged.
  • IVrHinge gets Opened/Closed events. VrHinge raises them; HvrHingeBridge raises them from HVRPhysicsDoor.Opened/Closed with the same once-per-transition polling HvrPhysicsChest had.
  • VrChestSlots subscribes to VrHinges.FindActive(this) → backend-neutral; HvrPhysicsChest no longer calls the slots (only disables itself on other backends).
  • No HVR code copied.

To test

  • - Hvr: open a chest by physics → content appears; close → slots hidden; reopen → same items; lock-pick a locked chest. Unchanged (events now go through HvrHingeBridge, may arrive one frame later).
  • - Xri: grab the lid and pull → opens up to 110°, content appears; take an item; push the lid closed → slots hidden; reopen → same items, nothing doubled.
  • - Xri: a locked chest doesn't open; pick the lock → it unlocks and opens a bit.
  • Tested (Xri + simulator, scripted hand, G1 small crate at (51, 60, 287)): open/clamp at 110° with 5 items spawned, take one, close → Closed once and slots hidden, reopen → same 4 items, Lock() holds against a pulling hand, Unlock() opens ~14°.
  • Not tested: Hvr chest in play (code review: same polling, mutually exclusive IsActive of the two hinges), real lock-pick by hand, audible sounds, headset, save → load with an open chest.
  • Known: on Xri the lid must be pulled by hand (no use-to-open anymore); no gravity on the lid, it stays where it's let go and only closes softly below 5°.

Test on (delete if irrelevant)

  • PCVR
  • Mobile VR (Quest/Pico)

🤖 Generated with Claude Code

JaXt0r and others added 3 commits October 23, 2026 12:55
…ulls it open around its hinge up to 110°, the content spawns into the slots on the first open, closing it by hand hides the slots and reopening shows the same items; locked chests stay shut and unlocking by lock picking pushes the lid open a bit. The interim VrChestLidToggle (use = open/close) is replaced by VrHinge on oCMobContainer.prefab's lid (+ GothicGrabInteractable); IVrHinge gets Opened/Closed events (VrHinge, and HvrHingeBridge from HVRPhysicsDoor's state), so VrChestSlots subscribes to the active hinge on both backends and HvrPhysicsChest no longer drives the slots (HVR phase 4b). No player-visible change on the default Hvr backend.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JaXt0r
JaXt0r merged commit 84cd8ae into engine/hvr-replacement Oct 25, 2026
@JaXt0r
JaXt0r deleted the engine/hvr-replacement-4b branch October 25, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant