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

# Highlight Object & Remove Highlight on Object

> Apply and remove visual emphasis effects on 3D objects

## Overview

The **Highlight Object** and **Remove Highlight on Object** actions control visual emphasis effects (glow, outline, or pulse) on 3D objects. Use these to draw the learner's attention to objects they should interact with, or remove emphasis once the interaction is complete.

## Highlight Object

### When to Use

* **Focus attention**: draw the learner's eye to the object they should interact with next
* **Progression cues**: highlight components one at a time as the training progresses
* **Success feedback**: highlight an object after the learner successfully completes a task
* **Multiple targets**: highlight several objects to show available interactive elements
* **Color-coded guidance**: use different colors to indicate different object types or statuses

### Parameters

| Parameter           | Type           | Required | Description                                                                                      |
| ------------------- | -------------- | -------- | ------------------------------------------------------------------------------------------------ |
| Target Objects      | object list    | Yes      | One or more 3D objects to highlight. Pick them in the parameter panel or with **Edit in Scene**. |
| Highlight Color     | hex color      | No       | Color in hex (e.g., `#FF0000` red, `#00FF00` green, `#FFFF00` yellow). Defaults to red.          |
| Intensity           | number (0–100) | No       | Strength of the effect. Slider in the panel; defaults to 100.                                    |
| Duration (ms)       | number         | No       | How long the highlight stays on. Leave empty to keep it until removed.                           |
| Effect Type         | enum           | No       | **Glow** (default), **Outline**, or **Pulse**.                                                   |
| Wait Until Complete | boolean        | No       | If checked, the next action waits until this highlight finishes before running.                  |

### Key Behavior

* **Visual effect**: Glow, outline, or pulse around each target object.
* **Immediate**: The effect appears as soon as the action runs.
* **Override previous**: If an object is already highlighted, a new Highlight Object replaces the previous color, intensity, and effect.
* **No collision impact**: Highlighting an object doesn't change its physical properties or interaction boundaries.

## Remove Highlight on Object

### When to Use

* **Remove after interaction**: stop highlighting once the learner has clicked or engaged with the object
* **Cleanup**: remove emphasis effects when transitioning to a new task
* **Dynamic guidance**: hide highlights as the learner becomes familiar with the interface
* **Selective deemphasis**: stop highlighting one object while highlighting others

### Parameters

| Parameter           | Type        | Required | Description                                                              |
| ------------------- | ----------- | -------- | ------------------------------------------------------------------------ |
| Target Objects      | object list | Yes      | One or more objects to remove the highlight from.                        |
| Wait Until Complete | boolean     | No       | If checked, the next action waits until removal finishes before running. |

### Key Behavior

* **Selective or batch**: You can remove highlight from one object or multiple objects at once.
* **Safe if not highlighted**: Calling Remove Highlight on Object on an object with no highlight has no effect.
* **Non-destructive**: The object remains in the scene and fully functional; only the visual effect is removed.

## Practical Examples

### Step-by-Step Component Interaction

**Scenario**: A machine assembly task shows each component highlighted in sequence. As the learner completes each step, the highlight moves to the next component.

<Steps>
  <Step>
    **State: AssembleStep1**

    * `onEntry`:
      1. **Highlight Object**: Object: `component_a`, Highlight Color: `#FF6600` (orange)
      2. **Play Audio**: narration about component A
  </Step>

  <Step>
    **Transition: ComponentAPlaced** (triggered when learner interacts with component A)

    * Action list:
      1. **Remove Highlight on Object**: Target: `component_a`
      2. **Highlight Object**: Object: `component_b`, Highlight Color: `#FF6600`
      3. **Play Audio**: narration about component B
      4. Transition to **AssembleStep2**
  </Step>

  <Step>
    Highlights move from component to component, guiding the learner through the assembly sequence.
  </Step>
</Steps>

### Color-Coded Object Types

**Scenario**: A maintenance training highlights different types of objects in different colors: red for damaged items, green for safe items, yellow for warnings.

<Steps>
  <Step>
    In a state's `onEntry`:

    1. **Highlight Object**: Object: `damaged_bearing`, Highlight Color: `#FF0000` (red = danger)
    2. **Highlight Object**: Object: `safety_valve`, Highlight Color: `#00FF00` (green = safe)
    3. **Highlight Object**: Object: `pressure_gauge`, Highlight Color: `#FFFF00` (yellow = warning)
  </Step>

  <Step>
    The color coding immediately communicates the status of each component to the learner.
  </Step>
</Steps>

### Highlight on Success

**Scenario**: When the learner successfully completes a repair, highlight the repaired item as positive feedback.

<Steps>
  <Step>
    State `RepairAttempt`: learner tries to repair a component.
  </Step>

  <Step>
    If repair is successful, transition to `RepairSuccess` with action list:

    1. **Highlight Object**: Object: `repaired_component`, Highlight Color: `#00FF00` (green = success)
    2. **Play Audio**: `success_chime.mp3`
    3. **Set Variable** `repairComplete` to `true`
  </Step>

  <Step>
    Visual and audio feedback reinforce the learner's success.
  </Step>
</Steps>

### Progressive Emphasis Removal

**Scenario**: Early training steps have heavy visual guidance (multiple highlights). As learners progress, highlights are gradually removed.

<Steps>
  <Step>
    **Beginner level**:

    * Highlight: `component_a`, `component_b`, `component_c`, `tool_shelf` (4 items highlighted)
  </Step>

  <Step>
    **Intermediate level** (after learner completes first task):

    * **Remove Highlight on Object**: \[`component_a`, `component_b`]
    * Only highlight `component_c` and `tool_shelf` (2 items)
  </Step>

  <Step>
    **Advanced level** (after second task):

    * **Remove Highlight on Object**: all remaining highlights
    * Learners navigate without visual cues.
  </Step>

  <Step>
    Guidance fades as learners build confidence and competence.
  </Step>
</Steps>

<Tip>
  Use consistent color conventions:

  * **Green** for safe, correct, or positive actions
  * **Red** for danger, incorrect, or negative actions
  * **Yellow** for warnings or caution
  * **Blue** for neutral information or alternate paths

  This helps learners quickly understand status without reading labels.
</Tip>

<Note>
  Highlights are visual only—they don't change the object's physics, collision, or interactivity. An un-highlighted object is still clickable; a highlighted object is not necessarily more interactive.
</Note>

<Warning>
  If you highlight many objects at once (more than 3–4), the screen can become cluttered and confusing. Use highlights strategically to direct attention to the most important next step, not to highlight everything at once.
</Warning>
