Assets/_MolcaSDK/_VR/Scripts/Interactions/KnobInteraction.csBase: MolcaInteractionBase
Role
Tracks wrist rotation around the knob axis, applies smoothing and optional snap angles.Setup
Same pattern as Valve interaction:XRGrabInteractable + component + references for KnobStep.
Code
InspectoronRotationChanged, onPositionChanged, onFullRotation match the Valve interaction pattern:
Troubleshooting
- Snaps feel wrong — Adjust
snapPositionsor disablesnapToPositionsfor free rotation;startAnglemust match your authored pose. - Same as valve: no grab — Confirm
MolcaInteractionBase/XRGrabInteractablesetup per MolcaInteractionBase. - Step does not complete — See KnobStep (
targetAnglevs snap indices).
Unity Editor
Knob prefab with KnobInteraction + snap positions array visible.
