Skip to main content

Events

Add an Events component to an object to make it interactive, with no code.

Each event works like a sentence: when this happens, do these things.

Build an event​

FieldWhat it is
NameFor you. Name an event after what it does, not the object it is on.
TriggerWhen the event runs. New events start with Press on the object.
On objectFor triggers on an object: which object to watch. By default, this object.
StateFor state triggers: which state to watch.
KeyFor key triggers: record the key combination, with modifiers.
Action idFor UI action triggers: which button. Leave it empty to match any button.
StepsWhat happens, in order.

To add a step, click + add action. The menu has a search field, and its steps are sorted into four groups:

  • Actions do things like opening a link, changing the scene or showing an object.
  • Animations play a timeline animation or send an object along a path.
  • States change how something looks or behaves.
  • Logic adds conditions, variables, signals and pauses.

Some triggers run different steps for different moments. Press on the object, for example, has three lists: On click or tap, On press and On release.

Choose which object a step changes​

Every step has a Target object. Leave it empty, and the step acts on the object that holds the event. Pick another object, and the step acts on that one.

So an event lives on one object, but its steps can change any object. One event on a button can open a door, dim a light and show a sign somewhere else.

Triggers​

An event can react to:

  • input: press, hover, key, scroll, drag, pinch;
  • the scene starting;
  • the app pausing and resuming;
  • AR tracking found or lost;
  • timers;
  • the visitor coming close to an object;
  • state changes, and an object being shown or hidden;
  • signals from other events, and variables changing;
  • collisions;
  • UI buttons;
  • the character controller changing state.

The editor offers only the triggers that make sense for the scene. For example, "marker detected" does not appear in a plain 3D scene.

Taps also reach parent objects

A tap on an object also reaches its parents. So one event on a group catches taps on everything inside it. How triggers travel, and what each one does: Events.

Steps​

GroupSteps
ActionsScene transition · Space transition · Open URL · Open messenger · Call phone number · Compose email · File download · Contact download · Lock pointer · Release pointer · Show / hide object · Follow object · Look at object · Stop following
AnimationsPlay animation · Stop animation · Fly along path · Stop path flight
StatesSet state · Override properties
LogicIf — otherwise · Set variable · Send signal · Wait, then

Older projects can also have Transformation, Opacity, Material, Bone transform and Built-in animation steps. They still run, but the menu no longer offers them. To move things, use a preset from the Animation panel and the Play animation step.

Every step with all its settings: the step reference.

Branch with the If step

The If — otherwise step holds a condition and two lists of steps. You can put an If inside another If to get as many outcomes as you need.

Re-tracking​

In AR scenes, each event has a re-tracking mode. It decides what happens when the marker is lost and then found again:

  • start over right away;
  • never start over;
  • start over after the current steps finish.
If something runs twice

Events, patches and scripts all hear the same triggers. If you handle the same trigger on the same object in two of them, it runs twice. Handle each trigger in one place.


Next: Animation — move several objects together on a timeline.