LogoLogo
VIVERSESupportBlogDiscord
  • Creator Tools
  • Polygon Streaming
  • Introduction to Creator Tools
  • Publishing with Your VIVERSE Account
  • Optimization
  • World Decoration
    • Edit Mode
    • Supported Media & Settings
    • Creating From Templates
      • Pet Rescue Template Project
  • PlayCanvas SDK
    • PlayCanvas Extension Setup
    • Publishing to VIVERSE
    • Scene Settings
    • No Code Tools
      • Sample Project
      • Quests
      • Trigger & Action
        • Event Listeners
        • Entity Enabling & Disabling
        • Entity Collision Enabling & Disabling
        • Entity Physics
        • Avatar Teleport & Checkpoint
        • Animation & Sound
        • Asset Management
      • Media
        • Polygon Streaming
        • Images
        • Video
        • Audio
      • Pick and Throw
      • Networked
      • Seat
      • GPU Mesh Instancing
    • Custom Code
      • Connecting No-Code Events to Custom Scripts
      • Introduction to MJS
      • Camera Management: Settings and Switching
    • Examples
      • Create Your First PlayCanvas Project
      • SHADEART | Custom Shader
      • WITHIN | A Generative Audiovisual Maze
      • First Person Shooter with Destruction
  • Unity SDK
    • Porting from Unity to PlayCanvas
Powered by GitBook
LogoLogo

Important Links

  • COOKIE POLICY
  • TERMS OF SERVICE
  • PRIVACY POLICY
  • VIVERSE PARTNERS

Socials

  • X / Twitter
  • LinkedIn
  • Instagram

© 2025 HTC CORPORATION

On this page
  • EntityToggleCollision
  • EntityEnableCollision
  • EntityDisableCollision

Was this helpful?

Edit on GitHub
Export as PDF
  1. PlayCanvas SDK
  2. No Code Tools
  3. Trigger & Action

Entity Collision Enabling & Disabling

This document provides several guides that can be used to enable and disable colliders in a VIVERSE project. These actions can be configured to execute when triggers are activated.

PreviousEntity Enabling & DisablingNextEntity Physics

Last updated 3 months ago

Was this helpful?


EntityToggleCollision

An Action That Toggles An Object's Collider On/Off

This guide provides instructions for setting up the EntityToggleCollision action. In the sample app, every time the avatar enters the green trigger area, a notification is sent to the wall and the collider on the wall is toggled on/off. The wall is green when the avatar can pass through and red when the avatar can not pass through.

Before the avatar enters the green trigger area, the wall is red and the avatar can not pass through it.

Once the avatar enters the green trigger area, the collider on the wall is toggled to be disabled. The wall is green and the avatar can pass through it.

In this example, a trigger is created and when the avatar enters the trigger area, an action sends a notification to toggle another object's collider on/off. Any object can be used as a trigger, as long as the object has a collision component. This example uses a 3D box as the trigger area.

1

Create the 3D object that will send the notification

A. Add a 3D object to the scene.

B. The Collision component is not required for EntityToggleCollision action to work. The Collision component is required for the EntitySubscribeTriggerEnter trigger that will be used in this example.

C. Click the Edit Viverse Extension button.

2

Add the NotificationCenterPublish action

A. In the VIVERSE extension, select the TriggerAndAction plugin for the Select plugins dropdown.

B. Add a Trigger and select EntitySubscribeTriggerEnter.

C. Add local-player to the tags to filter field.

D. Add an Action and select NotificationCenterPublish

E. Create a unique notification name and add it to the notification name to publish field. In this example, the notification is called ToggleWall.

3

Create the 3D object that will receive the notification

A. Add a 3D object to the scene.

B. Add a Collision component.

C. Add a Rigidbody component.

D. Click the Edit Viverse Extension button.

4

Add the EntityToggleCollision action

A. In the VIVERSE extension, select the TriggerAndAction plugin for the Select plugins dropdown.

B. Add a Trigger and select NotificationCenterSubscribe.

C. The same text that was added to the notification name to publish needs to be added to the notification name to subscribe.

D. Add an Action and select EntityToggleCollision.

EntityEnableCollision

Create An Action That Enables An Object's Collider

This guide provides instructions for setting up the EntityEnableCollision action. In the sample app, every time the avatar enters the red trigger area, a notification is sent to the wall object and the collider on the wall object is enabled. The wall is green when the avatar can pass through and red when the avatar can not pass through.

The avatar is able to pass through the wall when the wall’s collider is disabled.

Once the avatar enters the red trigger area, the EntityEnableCollision action enables the wall’s collider

The avatar is unable to pass through the wall once the wall’s collider is enabled.

In this example, a trigger is created and when the avatar enters the trigger area, an action sends a notification to enable another object's collider. Any object can be used as a trigger, as long as the object has a collision component.

1

Create a trigger area

A. Create a new 3D Box entity.

B. Add a Collision component.

C. Adding a material is optional. A transparent material has been added so that the trigger area is visible in play mode.

D. Click the Edit Viverse Extension button.

2

Add the EntitySubscribeTriggerEnter trigger

A. In the VIVERSE extension, select the TriggerAndAction plugin for the Select plugins dropdown.

B. Add a Trigger and select EntitySubscribeTriggerEnter.

C. Add local-player to the tags to filter field.

E. Add an Action and select NotificationCenterPublish.

F. Create a unique notification name and add it to the notification name to publish field. In this example, the notification is called EnableWall.

3

Create the object that will have it's collider enabled

A. Create a new 3D Box entity.

B. Add a Collision component.

C. Adding a material is optional. A transparent material has been added so that the trigger area is visible in play mode.

D. Click the Edit Viverse Extension button.

4

Add the EntityEnableCollision action

A. In the VIVERSE extension, select the TriggerAndAction plugin for the Select plugins dropdown.

B. Add a Trigger and select NotificationCenterSusbscribe.

C. The same text that was added to the notification name to publish needs to be added to the notification name to subscribe.

D. Add an Action and select EntityEnableCollision.

EntityDisableCollision

Create An Action That Disables An Object's Collider

This guide provides instructions for setting up the EntityDisableCollision action. In the sample app, every time the avatar enters the green trigger area, a notification is sent to the wall object and the collider on the wall object is disabled. The wall is green when the avatar can pass through and red when the avatar can not pass through.

The avatar is unable to pass through the wall when the wall’s collider is enabled.

Once the avatar enters the green trigger area, the action disables the wall’s collider

The avatar is able to pass through the wall when the wall’s collider is disabled.

In this example, a trigger is created and when the avatar enters the trigger area, an action sends a notification to disable another object's collider. Any object can be used as a trigger, as long as the object has a collision component.

1

Create a trigger area

A. Create a new 3D Box entity.

B. Add a Collision component.

C. Adding a material is optional. A transparent material has been added so that the trigger area is visible in play mode.

D. Click the Edit Viverse Extension button.

2

Add the EntitySubscribeTriggerEnter trigger

A. In the VIVERSE extension, select the TriggerAndAction plugin for the Select plugins dropdown.

B. Add a Trigger and select EntitySubscribeTriggerEnter.

C. Add local-player to the tags to filter field.

E. Add an Action and select NotificationCenterPublish.

F. Create a unique notification name and add it to the notification name to publish field. In this example, the notification is called DisableWall.

3

Create the object that will have it's collider disabled

A. Create a new 3D Box entity.

B. Add a Collision component.

C. Adding a material is optional. A transparent material has been added so that the trigger area is visible in play mode.

D. Click the Edit Viverse Extension button.

4

Add the EntityDisableCollision action

A. In the VIVERSE extension, select the TriggerAndAction plugin for the Select plugins dropdown.

B. Add a Trigger and select NotificationCenterSubscribe.

C. The same text that was added to the notification name to publish needs to be added to the notification name to subscribe.

D. Add an Action and select EntityDisableCollision.