We’re introducing Meta accounts in August 2022: a new way to log into VR devices that doesn’t require a Facebook account. Learn more

WHEN COLLIDING WITH OBJECT

Event that runs when an object collides with another object.

Appearance in Composition Pane
Description

Codeblocks below when colliding with object will execute when another object collides with the object the script is attached to. The attached object must be configured in its properties panel to detect collisions: it must be collidable under Behavior > Collidable. Under More > Object Tag, enter a tag that matches the colliding object’s tag. Which can be set within the colliding object’s properties panel under Attributes > Tag.
Parameters

object
The object that collided with the object this script is attached to.


PREREQUISITE READING

WHEN TRIGGER IS EXITED BY OBJECT precedes this tutorial


Example 1: Hide an object

When colliding with object here causes the intercepted object obj to hide. See notes above about properly configuring the attached and colliding objects. *Please note that “hide” has been replaced with “Set object visibility.”

Next Up