Skip to main content
File: Assets/_MolcaSDK/_VR/Scripts/Scenario/Steps/KnobStep.cs
Base: Step

Role

Same pattern as ValveStep but targets Knob interaction.

Code

Same lifecycle as ValveStep: resolve knobInteractionRef, SubscribeToAngle, OnTargetAngleReachedComplete(); optional AnalogFeedbackUI and autoManageLock.
using MolcaSDK.VR.Scenario;

public class KnobLesson : UnityEngine.MonoBehaviour
{
    public KnobStep step;

    public void ApplyDifficulty(float degrees) => step.SetTargetAngle(degrees);
    public float CurrentTarget => step.GetTargetAngle();
}

Troubleshooting

  • Mirror of valve issues — See ValveStep (reference resolution, angle range, lock). For snap knobs, confirm discrete positions align with targetAngle (Knob interaction).

Unity Editor

KnobStep Inspector with knob interaction reference.

KnobStep in Unity Inspector