> ## 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.

# LookAtStep

> Gaze dwell and cone threshold toward a target transform.

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

## When to use

Use `Look At 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

Tracks head/camera forward vs target direction; accumulates **dwell time** inside a configurable cone; optional reset when look leaves the cone. May bind to **ProgressFeedbackUI**.

## Code

**`Update`** (when active) tests gaze vs target with **`IsLookingAtTarget`**; accumulates **`requiredLookTime`** inside **`lookAngleThresholdDegrees`**. When reached, calls **`Complete()`**. **`resetProgressWhenLookAway`** clears dwell when the cone is lost.

Optional **`ProgressFeedbackUI`** from **`feedbackUIRef`**; target/head use **`SceneObjectReference`** → **`ReferenceableComponent`** transforms (head defaults to **`Camera.main`** if unset).

## Troubleshooting

* **No target / no head** — Logs error if **`lookAtTargetRef`** invalid or **`Camera.main`** missing when **head** reference unset.
* **Dwell never fills** — Widen **cone** angle, move target closer, or check wrong **`ReferenceableComponent`** on the target object.
* **Progress resets unexpectedly** — Disable **`resetProgressWhenLookAway`** for “sticky” progress.

## Related

* [Reference system](/core/reference-system)
* [Step (base class)](/core/step)

## Unity Editor

<Frame hint="LookAtStep with target ref and threshold fields visible." caption="LookAtStep Inspector">
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/ptmolcateknologinusantara/images/features/vr/steps/look-at-step-inspector.png" alt="LookAtStep in Unity Inspector" />
</Frame>
