# Overlap

The nodes on this page are **states**. Each one keeps an eye on part of your scene and continuously reports a simple true/false answer about it — for example “are these two objects touching?” or “is the viewer standing inside this area?” A state is not an action you run once and finish; it is a live condition the scene keeps checking the whole time it is playing.

Every one of these nodes gives you the same three things to work with:

- **OnTrue** — a trigger that fires the moment the answer becomes true.
- **OnFalse** — a trigger that fires the moment the answer becomes false.
- **Output Boolean** — the current true/false value, ready to read at any time or to send into a **Branch** node.

The two triggers fire only when the answer *changes* — not over and over while it stays the same. These nodes only watch and report; they never move, assemble, or change anything in your scene.

This page covers the **overlap** states. For states that follow a part through a **VR assembly** — whether it can be put on or taken off, or is fully assembled — see the **Assembly** page.

---

## Overlap

These nodes report whether things are sharing the same space in your scene. **Overlap** means two volumes intersect — they are touching or passing through one another. One node compares two objects you choose; the other compares an object against the **viewer** (the person moving through the scene in VR).

### Nodes Overlap

Watches two objects in your scene and reports whether they are overlapping in space — that is, whether their 3D shapes share the same area.

#### What it does

You give this node two objects from your scene. It keeps watching them while your scene runs and answers one simple yes/no question: are these two objects overlapping right now? The answer is true whenever the two objects’ 3D volumes share the same space, and false whenever they are apart.

This node only watches and reports — it never moves, changes, or touches the objects themselves. It gives you a true/false answer plus two triggers so you can make something happen the moment the two objects start touching, or the moment they come apart.

#### Inputs

<table id="bkmrk-port-type-what-to-co"><thead><tr><th style="white-space: nowrap;">Port</th><th style="white-space: nowrap;">Type</th><th>What to connect</th></tr></thead><tbody><tr><td style="white-space: nowrap;">**SceneNode A**</td><td style="white-space: nowrap;">Scene node</td><td>The first object to check — for example a `Gear`. It must be a different object from SceneNode B. The viewer’s start position cannot be used here; to test the viewer against an object, use the User Overlap Node instead.</td></tr><tr><td style="white-space: nowrap;">**SceneNode B**</td><td style="white-space: nowrap;">Scene node</td><td>The second object to check — for example a `Housing`. It must be a different object from SceneNode A. The viewer’s start position cannot be used here either.</td></tr></tbody></table>

#### Outputs

<table id="bkmrk-port-type-what-you-g"><thead><tr><th style="white-space: nowrap;">Port</th><th style="white-space: nowrap;">Type</th><th>What you get</th></tr></thead><tbody><tr><td style="white-space: nowrap;">**OnTrue**</td><td style="white-space: nowrap;">Trigger</td><td>Fires once the instant the two objects start overlapping. Wire it to whatever should happen the moment they come together.</td></tr><tr><td style="white-space: nowrap;">**OnFalse**</td><td style="white-space: nowrap;">Trigger</td><td>Fires once the instant the two objects stop overlapping and move apart. Wire it to whatever should happen the moment they separate.</td></tr><tr><td style="white-space: nowrap;">**Output Boolean**</td><td style="white-space: nowrap;">True / false</td><td>The current answer: true while the two objects are overlapping, false while they are apart. You can read it at any time or feed it into a Branch node.</td></tr></tbody></table>

#### Example

<table id="bkmrk-scenenode-a-input-ge"><tbody><tr><td>**SceneNode A** input</td><td>`Gear`</td></tr><tr><td>**SceneNode B** input</td><td>`Housing`</td></tr><tr><td>**OnTrue** output</td><td>Fires the moment the `Gear` slides into the `Housing` and they begin to overlap</td></tr><tr><td>**OnFalse** output</td><td>Fires the moment the `Gear` is pulled back out and the two no longer overlap</td></tr><tr><td>**Output Boolean** output</td><td>`true` while the `Gear` is inside the `Housing`</td></tr></tbody></table>

#### Tips

- OnTrue and OnFalse each fire just once, at the moment the answer changes — they do not keep firing while the two objects stay overlapping. If you need to act on the ongoing state rather than the moment it changes, read the Output Boolean instead.
- The two objects must be different. Pick two separate scene objects for SceneNode A and SceneNode B.
- To check whether the viewer is overlapping an object, use the User Overlap Node — the viewer’s start position is not accepted here.

### User Overlap Node

This node reports whether the person viewing the scene is currently sharing the same space as a chosen object — in other words, whether the viewer is standing in or passing through it.

#### What it does

You give it one object from your scene. While the scene runs, the node keeps watching the viewer’s position and answers a single live question: is the viewer overlapping that object right now? The answer is `true` while the viewer’s space and the object’s space share the same area, and `false` the rest of the time.

This node only watches and reports — it never moves, hides, or changes the object or the viewer in any way. You decide what happens by wiring its outputs to other nodes. The two triggers fire at the moment the answer changes: one the instant the viewer steps into the object, the other the instant they step back out. The true / false output always holds the current answer, so you can read it whenever you like.

#### Inputs

<table id="bkmrk-port-type-what-to-co-0"><thead><tr><th style="white-space: nowrap;">Port</th><th style="white-space: nowrap;">Type</th><th>What to connect</th></tr></thead><tbody><tr><td style="white-space: nowrap;">**SceneNode**</td><td style="white-space: nowrap;">Scene node</td><td>The object in your scene you want to test the viewer against — for example a doorway, a safety zone, or a part such as `Housing`. The node reports `true` while the viewer is sharing the same space as this object. (The viewer start position cannot be used here.)</td></tr></tbody></table>

#### Outputs

<table id="bkmrk-port-type-what-you-g-0"><thead><tr><th style="white-space: nowrap;">Port</th><th style="white-space: nowrap;">Type</th><th>What you get</th></tr></thead><tbody><tr><td style="white-space: nowrap;">**OnTrue**</td><td style="white-space: nowrap;">Trigger</td><td>Fires once the moment the viewer starts overlapping the object. Wire it to whatever should happen when the viewer steps in — play a sound, show a message, open a door.</td></tr><tr><td style="white-space: nowrap;">**OnFalse**</td><td style="white-space: nowrap;">Trigger</td><td>Fires once the moment the viewer stops overlapping the object. Wire it to whatever should happen when the viewer leaves — the matching “step out” reaction.</td></tr><tr><td style="white-space: nowrap;">**Output Boolean**</td><td style="white-space: nowrap;">True / false</td><td>The current answer as a `true` / `false` value: `true` while the viewer is inside the object, `false` otherwise. Read it directly or send it into a Branch node to choose between two paths.</td></tr></tbody></table>

#### Example

<table id="bkmrk-scenenode-input-rest"><tbody><tr><td style="white-space: nowrap;">**SceneNode** input</td><td>`RestrictedZone`</td></tr><tr><td style="white-space: nowrap;">**OnTrue** output</td><td>Fires when the viewer walks into `RestrictedZone` — wire it to a warning sound.</td></tr><tr><td style="white-space: nowrap;">**OnFalse** output</td><td>Fires when the viewer leaves `RestrictedZone` — wire it to stop the warning.</td></tr><tr><td style="white-space: nowrap;">**Output Boolean** output</td><td>`true` while the viewer is inside the zone, `false` when they are outside</td></tr></tbody></table>

#### Tips

- Use **OnTrue** and **OnFalse** as a matched pair when you want one reaction as the viewer enters and another as they leave — for example showing and then hiding a hint panel.
- When you only need to check the answer at a specific point (rather than react the instant it changes), feed **Output Boolean** into a Branch node instead.
- Pick an object whose space is big enough to comfortably contain the viewer, such as a room or a marked floor area, so the overlap is easy to trigger.