HnFClimbing port
TL;DR: HnFClimbing detects VR controller grip and anchors the player’s motion to the hand that started the grab. CVR WASM exposes grip axes (CVRInput.GripLeft, CVRInput.GripRight) but no hand transforms. The port uses the head viewpoint (Player.GetViewPoint()) as a “hand” proxy — adequate for the mechanic but not a perfect match — and drops the player-grab-other-player feature entirely (needs remote bone access).
What ports and what doesn’t
Section titled “What ports and what doesn’t”| Feature | Ports? |
|---|---|
| Grip detection | Yes — CVRInput.GripLeft / GripRight |
| Wall trigger detection | Yes — OnPlayerTriggerEnter / OnPlayerTriggerExit |
| Player motion while gripping | Partial — uses head viewpoint as hand proxy |
| Stamina bar, recovery | Yes — pure numeric |
| HUD attached to hand | Partial — attaches to head instead; hand transforms not exposed |
| Player scale sync | Partial — CVR has no avatar-scale event |
| Grabbing other players by bones | No — no remote bone access |
| Jump height adjust | No — no WASM API for it |
Port strategy
Section titled “Port strategy”OnPlayerTriggerEnter(Player player) fires when any player overlaps the trigger. Filter to the local player (LocalPlayer.PlayerObject) and track insideTrigger. In Update, while insideTrigger && CVRInput.GripLeft > threshold, read the head viewpoint position, convert to the wall’s local space, and move the local player by the opposite delta via LocalPlayer.SetPosition() + LocalPlayer.SignalDiscontinuity(). Stamina ticks down while gripping, recovers otherwise.
The HUD (HnFStaminaBar) pins itself to the head via view.GetPointPosition() + view.GetPointRotation() * headOffset each LateUpdate. Set renderOnLeftHand has no effect here — there’s no hand transform to pin to.
Wiring
Section titled “Wiring”- Collider on the climbable wall,
IsTrigger = true. AddHnFClimbingto it. - Separate HUD root with
HnFStaminaBar. Assignoutput(a world-spaceText) andstaminaGraphicAnimatorif you have one. Drop it ontoHnFClimbing.staminaBar. - Tune
GripThreshold(0.75 is a good default),MaxStamina(seconds of continuous grab), andStaminaRecoveryRate.