Skip to content

2b - Mobs, NPCs (talk, loot) and mouth on XRI - #428

Merged
JaXt0r merged 2 commits into
engine/hvr-replacementfrom
engine/hvr-replacement-2b
Oct 24, 2026
Merged

JaXt0r merged 2 commits into
engine/hvr-replacementfrom
engine/hvr-replacement-2b

Conversation

@JaXt0r

@JaXt0r JaXt0r commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Merge order: 1a → 1b → 1c → 1d → 2a → 2b → 3a → 3b → 3c, 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 2b: mobs, NPCs, melee and mouth on the Xri backend (needs 2a).

  • XRSimpleInteractable + bridge on oCMob* and oCNpc: a grip means use / talk. VrInteractable.IsSelectOnly tells "use" from "hold"; VRNpc only does the grab-and-release workaround on Hvr.
  • Grip on an NPC starts the dialog, again during a dialog skips the line; on a dead NPC it opens the loot panel (slots in 3c); on a mob it uses it.
  • Mouth (VRMouth) on the XRI camera, so held food can be eaten.
  • Helper that avoids Collider.ClosestPoint warnings on non-convex mesh colliders (used by the grab code from 2a too).

To test

  • - Hvr: talk to an NPC by grabbing, use a mob; unchanged.
  • - Xri: grip an NPC → dialog; grip again → line skipped; dead NPC → loot panel.
  • - Xri: use a fire/wheel/bed/seat/switch by grip.
  • - Xri: hold food to the mouth → eaten.
  • - Xri: swing a weapon at an NPC — needs a headset: does a fast swing hit, and do slow movements cause false hits? (Thresholds are the HVR values.)
  • Not tested: skipping a line while it is actually playing, beds/seats/switches, dig spots (no code change needed, reads the grabbed item per hand).
  • Known: eating a held item throws MissingReferenceException (found-bugs.md).

Test on (delete if irrelevant)

  • PCVR
  • Mobile VR (Quest/Pico)

🤖 Generated with Claude Code

…talks to it or skips a line, a dead NPC opens the loot panel, beds/fires/wheels/switches/seats are used, hovering shows the name label or the NPC's health bar (XRSimpleInteractable + XriInteractableBridge on the mob and oCNpc prefabs, IsSelectOnly keeps the HVR release workaround in VRNpc for HVR only); eating at the mouth works on the XRI rig (VRMouth on its camera); no more ClosestPoint warnings while pointing at mobs (HVR phase 2b). No player-visible change on the default Hvr backend.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JaXt0r JaXt0r mentioned this pull request Oct 23, 2026
@JaXt0r

JaXt0r commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

The raycaster to grab an object is nearly infinite. I put a ticket to update it. Apart from that: Works.

@JaXt0r
JaXt0r merged commit 743d9fe into engine/hvr-replacement Oct 24, 2026
@JaXt0r
JaXt0r deleted the engine/hvr-replacement-2b branch October 24, 2026 04:29
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