viverse logo

EntityDisable

EntityDisable - Create An Action That Disables An Object

This guide provides instructions for setting up the EntityDisable action. In the sample app, once the avatar collides with the gold coin, the gold coin is disabled.

1 2
The avatar is not colliding with the gold coin. Once the avatar collides with gold coin, the gold coin is disabled.

1. In this example, a trigger is created and when triggered, an action disables an object. Any object can be used as a trigger, as long as the object has a Collision component. Because this specific example uses a 3D object that the avatar and other objects can collide with, a RigidBody component needs to be added. In this example, the object golden_coin is used, but a simple cube will suffice.

A. Click the "Add Component" button. Select Physics > Collision to add a Collision component. Click the "Add Component" button again and select Physics > Rigid Body to add the RigidBody component.

B. In this example, the golden_coin has a Mesh collider that encompasses the entire object by default. Resize the collider here if the collider's size needs to be changed.

C. Click the "EDIT VIVERSE EXTENSION" button to add the VIVERSE functionality.

3

2. To add the EntityDisable action functionality

A. Click the Select plugins text field and select TriggerAndAction in the dropdown menu.

B. Click "+" beside the Select a module and add dropdown.

C. Click "+" beside the selected module dropdown.

D. Click the type dropdown and select a desired trigger. In this example the EntitySubscribeCollisionStart trigger is selected.

E. Click "+" beside the selected module dropdown.

F. Click the type dropdown and select EntityDisable action in the dropdown menu.

4

 

Previous

EntityFadeOut

Next

NotificationCenterPublish & NotificationCenterSubscribe