Assets/_MolcaSDK/_VR/Scripts/Interactions/ValveInteraction.csBase: MolcaInteractionBase
Setup
XRGrabInteractable on the handle + ValveInteraction + optional ReferenceableComponent for ValveStep.
Role
Projects hand motion onto a plane, drives handle rotation, exposes angle subscriptions and limits (see serialized fields and public API in source).Code
InspectorUnityEvent hooks are the usual integration path. From code, the same events are exposed as fields on ValveInteraction:
Troubleshooting
- Handle does not rotate — Check
valveHandle,rotationAxis, lock state, and thatXRGrabInteractablefires select events on this rig. - Target angle never reached — ValveStep uses
SubscribeToAngleagainst accumulated rotation; aligntargetAnglewithmin/maxclamp andstartAngle. - Jitter or axis wrong — Toggle
useInteractableTransformvs explicit handle; verify axis is in handle local space.
Unity Editor
Scene view: hand on valve + Inspector: ValveInteraction fields (handle, axis, limits).
