World Tracking Events
In addition to using the various ...Layer Clip
parameters, the WorldTracker
component exposes event handlers that you can use to add further interaction to your AR experiences.
Event | Description |
---|---|
onClick |
Event which is emitted when a mouse button is clicked. |
onPointerDown |
Event which is emitted when the user touches their device (e.g. taps a button) or when a mouse button is clicked. |
onPointerUp |
Event which is emitted when a touch or click has been released. |
onPointerEnter |
Event which is emitted when a pointer (e.g a mouse cursor or touch input) enters the bounding area of a specific element. |
onPointerMove |
Event which is emitted when a pointer (e.g a mouse cursor or touch input) moves within the bounding area of a specific element. |
onPointerLeave |
Event which is emitted when a pointer (e.g a mouse cursor or touch input) exits the bounding area of a specific element. |
onIntersectionEnter |
Event which is emitted when an individual element enters (intersects) with another individual element (e.g. Starting a 3D animation when the camera focuses on a 3D component). |
onIntersectionLeave |
Event which is emitted when an individual element exits (intersects) another individual element (e.g. Pausing a 3D animation when the camera focuses away from a 3D component). |
Using events
You can use events to increase engagement by adding interactive elements to your Mattercraft project.
You can use Behavior Actions to add such interactivity.
Next article: World Tracking best practices