Documentation

Interactivity (logic nodes)

Logic is how your experience reacts. In the Nodes panel you wire events (things that happen) to actions (things to do) - no coding needed.

How it works

Each node is a card. You connect an event node's output to an action node's input by dragging a wire between their dots. When the event fires, the connected actions run - and you can chain several actions in a row.

Wire events to actions: here, tapping an object plays an animation.

Right-click the canvas (or use the palette) to add a node. Nodes are colour-coded - events in amber, actions in sky blue.

To work with several nodes at once, hold Shift and drag on empty canvas to box-select, or Shift-click (Ctrl/Cmd-click also works) to add nodes to the selection. A selection moves together when dragged, and Delete removes it - right-click for the same option.

Events

EventFires when…
On Scene Startthe scene first appears (the target is found, or you arrive via Go To Scene).
On Tapthe user taps the object you choose (a 3D object or an on-screen UI Overlay element).
On Collisiontwo chosen objects touch - see Collisions below.
On Hand Touch / On Hand Touch Enda hand or finger starts or stops touching the Interactive object you choose. See Hand interaction and physics.
On Grab / On Releasethe Interactive object you choose is picked up, or let go.

Actions

ActionWhat it does
Go To SceneSwitch to another scene, with an optional transition (fade, scale, slide, spin) and duration.
Play SoundPlay an imported audio clip, optionally looping, at the Volume its slider sets. Its On start output runs at once; After sound runs once the sound has played to its end (never while it loops, and not at all if Stop Sound, another Play Sound of the same audio or a scene change comes first).
Stop SoundStop a playing sound - every playing copy of the chosen audio clip stops and rewinds.
Play VideoStart playing a chosen video object at a Volume (0 plays it muted) and Speed, looping or not. On start runs at once; After video runs once the video has played to its end (never while it loops, and not at all if Stop Video, another Play Video on the same object or a scene change comes first). A browser that blocks sound until the viewer taps plays it muted.
Stop VideoStop a chosen video object and rewind it to the start.
Play AnimationPlay an animation clip on an object (a keyframe clip or a model's embedded animation). Its On start output runs at once. After animation runs once the clip has played to its end: never for a looping clip, and not at all if Stop Animation, another Play Animation on the same object or a scene change comes first.
Stop AnimationStop a playing animation, freezing it in place.
Show Object / Hide ObjectReveal or hide an object.
FadeFade an object in or out over the number of seconds you set. Fade in shows it and takes it to its own opacity (the Inspector's Opacity). Fade out takes it to invisible, then hides it so it can no longer be tapped. Whatever is wired to its output runs once the fade has finished. A newer Fade on the same object takes over from where it is.
DelayWait a number of seconds before the next action in the chain runs.
Set Physics / Set InteractiveTurn gravity, or touching and grabbing, on or off for an object with Collisions.
Set Can be pushedLet an open hand push an object with Collisions and Physics along, or stop it.
Push ObjectGive an object with Physics a shove.
Reset ObjectPut an object back where the scene started it, at rest.

Note

Sounds and videos never outlive their scene: when the experience moves to another scene with Go To Scene, everything still playing - including looping sounds - stops automatically.

A worked example

To make an object appear, play a sound, wait, then jump to the next scene when tapped:

  1. Add an On Tap node and choose the object.
  2. Wire it to Show Object → Play Sound → Delay (2s) → Go To Scene.

Variables, maths & logic

Three more node categories let you build cleverer behaviour - keeping a score, doing a sum, or making a decision. The palette groups them under collapsible headings you can fold away when you are not using them.

A variable is a named value your experience can remember and change while it runs - a score, a counter, or an on/off state. Create variables in the Variables panel on the left: give each a name, a type (Number, Text or True / False), and a starting value. A variable can be scene-local (resets each time its scene begins) or global (shared across scenes for the whole session).

These categories work with two kinds of wire:

  • Flow wires (as before) decide what runs next.
  • Value wires carry a number, text or true/false value from one node's output into another's input - shown in blue below.
Value wires (blue) feed data into nodes; here each tap adds 1 to the score.
CategoryNodes
VariablesSet Variable (put a value into a variable) and Get Variable (read its current value).
OperatorsValue (a fixed value), Math (add / subtract / multiply / divide / remainder), Compare (equal, less than, greater than… → true/false), and And / Or / Not.
LogicIf (run the True or False branch), While (repeat while a condition holds), and For (count from a start to an end value).

To show a variable on screen, add a Text element in the UI Overlay and set its Show variable (live) option - the text then displays the value and updates the instant it changes, perfect for a live score.

Note

Variable changes and If / While / For decisions happen immediately as the logic runs. A Delay only holds back the actions after it - not a variable being set or a condition being checked. Loops are also safety-capped so an experience can never freeze.

Collisions: when two objects touch

The On Collision event fires when two objects bump into each other.

  1. Select each object and turn on Collisions in the Inspector - both objects need it on.
  2. Add an On Collision node and choose Object A and Object B.
  3. Wire it to whatever should happen - a sound, a score change, a scene switch.
On Collision fires once when two collidable objects' boxes touch.

It fires once when the objects' boxes first overlap, and again only after they have been apart for at least a quarter of a second and touch once more. So holding them together, or an object that bounces or wobbles against the other for a moment, won't retrigger it. The order of A and B doesn't matter. Collisions are for 3D scene objects, not on-screen UI Overlay elements.

The box around each object follows its Bounds once you have changed them (to any type but Mesh), and otherwise the object as drawn. A Plane with Floor turned on always counts as solid, so an On Collision node can name it too.

Note

If you delete an object or scene that a node points at, AR Works clears that reference and shows a warning badge on the node, so it is obvious the node needs re-pointing rather than silently doing nothing.

Tip

Use Preview to test your logic instantly - tap objects right in the browser.