Skip to content

4a - Doors on XRI: VrHinge (grab, limits, sounds, lock picking) - #432

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

JaXt0r merged 7 commits into
engine/hvr-replacementfrom
engine/hvr-replacement-4a

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 4a: doors on the Xri backend (needs 3c). Phase 4 is split into 4a doors (VrHinge), 4b chest lid on VrHinge (replaces the interim VrChestLidToggle), 4c ladders + IsClimbing.

  • New backend-neutral VrHinge (IVrHinge): grabbing the leaf turns it with the hand's angle around the hinge axis, clamped to 0-90°; after release it swings on with the last speed and stops at the limits; soft close below 5° (0.25 s); Opened/Closed events once per transition; Gothic open/close sounds once per transition (from VRVobDoor); Lock()/Unlock() (unlock gives a small push); hand > 1 m away lets go (teleport).
  • Kinematic angle solving instead of HingeJoint + velocity tracking (the plan's fallback): the joint version overshot the limit by ~8°, jammed and recoiled on release. Kinematic also means the CharacterController can't push the door through its limits.
  • oCMobDoor.prefab (UnityMCP): VrHinge + GothicGrabInteractable (saved disabled, enabled only by XriInteractableBridge on Xri) + XriInteractableBridge on the leaf; HVR components stay. HvrHingeBridge disables HVRPhysicsDoor on other backends.
  • Lock picking: the AddForce push only applies to non-kinematic (HVR) doors.
  • No HVR code copied; written from the behaviour spec in phase-4-doors-chests-ladders.md.

To test

  • - Hvr: open/close doors, lock-pick a locked door; unchanged.
  • - Xri: G1 old camp, grab a door leaf and pull/push → follows the hand, stops at 90°, let go while moving → swings to the limit without bouncing; close slowly → one close sound.
  • - Xri: locked hut door (e.g. at (183, -2, 291)) doesn't move; pick the lock → door unlocks and opens a bit.
  • - Xri: teleport while holding a door → it lets go.
  • - Xri thumbstick teleport (stick forward = arc, release = teleport, grip = cancel): stairs/slopes work; red mid-air, on roofs/high walls, through bars/fences, >1 m up or >3 m down; with a torch in the right hand.
  • Tested (Xri + simulator, scripted hand in the old camp): follow, clamp, release swing, soft close with one Closed, lock/unlock, the locked hut door locked by the picking script, teleport break-away.
  • Not tested: Hvr backend in play (code/prefab review only), build without GOTHIC_HVR_INSTALLED, headset feel (hand angle unfiltered), a real lock-pick sequence by hand, audible sounds, two hands on one door (first hand wins).
  • Known: unlike HVR, a hand or the body can't push a door without grabbing it; if the grabbing hand is destroyed while held, the leaf stays held until release; one unexplained InvalidCastException (no stack) seen once during scripted testing, not reproducible.

Test on (delete if irrelevant)

  • PCVR
  • Mobile VR (Quest/Pico)

🤖 Generated with Claude Code

JaXt0r and others added 7 commits October 23, 2026 05:23
…ch-to-text without microphone, eating a held item, culling list error) are documented in found-bugs.md instead of tickets.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… turns it around its hinge with the hand (kinematic angle solving, clamped to 0-90°), after letting go it swings on and stops at the limits without bouncing, below 5° it closes softly; Gothic open/close sounds play once per transition; locked doors don't move and unlocking by lock picking pushes them open a bit; a hand further than 1 m away (e.g. teleporting) lets go. New backend-neutral VrHinge (IVrHinge, Opened/Closed events, Lock/Unlock) with GothicGrabInteractable + XriInteractableBridge on oCMobDoor.prefab's leaf; HvrHingeBridge disables HVRPhysicsDoor on other backends; the lock picking push force only applies to non-kinematic (HVR) doors (HVR phase 4a). No player-visible change on the default Hvr backend.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-air exploits)

Right thumbstick forward shows an arc, release teleports, grip cancels. Valid only when grounded,
within 1 m rise / 3 m drop, with room for the standing capsule and a free head path, so the player
can't teleport through bars, over high walls, onto roofs or out of a fall.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pull the right thumbstick back to aim, release to teleport (like HVR).
Targets are valid if the ground is walkable per OpenGothic's testSlide
(GIL_HUMAN slide_angle, real ground normal from a downward ray), within
HVR's jump/drop distance of the capsule bottom, the standing capsule fits
and the head has a free line of sight to the target.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@JaXt0r

JaXt0r commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Doors opening works now. Also teleportation.

@JaXt0r
JaXt0r merged commit d96123c into engine/hvr-replacement Oct 25, 2026
@JaXt0r
JaXt0r deleted the engine/hvr-replacement-4a branch October 25, 2026 06:41
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