Jump to content

Triggers class in VR sample


photo

Recommended Posts

What is the purpose and usage of the Triggers class?

 

workflow is 
After creating a primitive node(box,sphere..) in the world, register that on Triggers class, 
and use it as a Trigger?

 

Link to comment

Hi Dongju,

Triggers is a framework class used to mark room obstacles for the VR Player (e.g. room walls, objects, etc.) and give a warning if there is an obstacle on the way (as the player gets closer to an obstacle, controllers' vibration becomes more intense).

You can simply create primitives for walls and objects in your room and add them as children to the node dummy named Obstacles, which is a child of the VR dummy node (see the hierarchy in the Editor). You don't need to register anything, as it is done automatically (all children of the Obstacles node are switched to invisible mode and used only to inform the player and prevent collisions with objects in the real room).

image.png

Please note,  however,  that the primitives used to mark obstacles must have their first surface (the one with 0-index) named as "box", "sphere", "capsule" or "cylinder" in order to be properly converted into corresponding trigger volumes.

Obstacles are not available for VRPlayerPC.

Hope this helps!

Thank you!

  • Like 1
Link to comment
14 hours ago, fox said:

that the primitives used to mark obstacles must be named as "box", "sphere", "capsule" or "cylinder" in order to be properly converted into corresponding trigger volumes.

Do I need to set both the node name and the surface of the node to box, sphere? (or capsule etc)

Link to comment
×
×
  • Create New...