> ## Documentation Index
> Fetch the complete documentation index at: https://docs-unity.molca.id/llms.txt
> Use this file to discover all available pages before exploring further.

# ValveStep

> Completes when ValveInteraction reaches a target angle.

**File:** `Assets/_MolcaSDK/_VR/Scripts/Scenario/Steps/ValveStep.cs`\
**Base:** [Step](/core/step)

## When to use

Use `Valve Step` when a VR training scenario needs this specific interaction as a step in a sequence. Configure entirely in the Inspector — no code required.

## Role

Wires to a [Valve interaction](/vr/interactions/valve-interaction) via [SceneObjectReference](/core/reference-system) (or equivalent serialized reference pattern in your version). Completes when rotation reaches the configured target angle; optional lock management and feedback UI references.

## Related

[Analog feedback UI](/vr/steps/vr-step-auxiliaries) may pair with valve training UI helpers.

## Code

On activate, resolve **`valveInteractionRef`** → **`ValveInteraction.SubscribeToAngle(targetAngle, OnTargetAngleReached)`**; callback calls **`Complete()`**. Optional **`AnalogFeedbackUI`** from **`feedbackUIRef`**; **`autoManageLock`** unlocks on activate and re-locks on deactivate/complete.

```csharp theme={null}
// Runtime retarget (while step is active):
using MolcaSDK.VR.Scenario;

public class ValveLessonConfig : UnityEngine.MonoBehaviour
{
    public ValveStep step;

    public void UseAngle(float degrees) => step.SetTargetAngle(degrees);
}
```

## Troubleshooting

* **No completion / null interaction error** — Ensure **`SceneObjectReference`** points at the object with [Valve interaction](/vr/interactions/valve-interaction); wait for async **`ResolveAsync`** (errors log after activation).
* **Target angle never hit** — **[Valve interaction](/vr/interactions/valve-interaction)** min/max clamp, locked state, or wrong **`targetAngle`** vs handle rotation range.
* **Feedback UI stuck** — Assign **`feedbackUIRef`** or leave invalid to skip; **`AnalogFeedbackUI`** must implement **`Setup()`** / **`Show()`** as in SDK.

## Unity Editor

<Frame hint="ValveStep + SceneObjectReference to ValveInteraction." caption="ValveStep Inspector">
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/ptmolcateknologinusantara/images/features/vr/steps/valve-step-inspector.png" alt="ValveStep in Unity Inspector" />
</Frame>
