pointAtTrigger

The pointAtTrigger activates when you point at an object. Rather than defining a volume in space like the userTrigger or wandTrigger, the pointAtTrigger is attached on to other objects in the scene.

Any objects (or other nodes) that are children of the pointAtTrigger node become active, and pointing at them will make the pointAtTrigger send an event.

It listens for button events too, so you can point and click on objects.

The benefit of the pointAtTrigger is that you do not need to move close to it to trigger it - by using the distance message, you can make the trigger active even when pointing from far away. Obvious uses might include simulating a remote control or firing projectiles at things, but in general it can be very handy for creating easy-to-use interfaces.

One of the major challenges for users in VR is learning how to navigate; it can often be challenging at first to move close to objects or triggers in order to interact with them. the pointAtTrigger can reduce the need for skillful navigation, making the interface a little more user-friendly.

For this to work, you do need a well-calibrated tracking system for your wand.

When using the CAVE simulator, hold down "ALT" while moving the mouse to simulate pointing the wand in different directions.

#include "User0"

pointAtTrigger (distance(30),
		when(start,cube.size(1.1)),
		when(stop,cube.size(1)),
		when(button1,cube.size(2)),
		when(buttonUp1,cube.size(1.1))
		)
		
object cube (file("cube.pfb"),position(0 20 3))


Node Reference

Derived from: ygNode

Messages

MessageParametersDefaultDescription
distance float 10.0 The distance within which the trigger will respond to events.

Events

EventVariablesDescription
start$user, $wand user is pointing at the node.
stop$user, $wanduser is pointing away.
button1, button2, button3 ... a button has been pressed.
buttonUp1, buttonUp2, buttonUp3 ... a button has been released.

(c) Ben Chang