|
// userTrigger.scene
// turns on a light when you walk near the trigger
#include "User0"
// put in a floor
object (file(floor.b3d))
// initial light color is a dim yellow
light light1 (diffuse (.2 .2 0))
// create a userTrigger node
userTrigger (volume (sphere 0 20 0 10),
when(enter,light1.diffuse(1 1 0)))
|
| Message | Parameters | Default | Description |
| volume | string volumeShape, float coordinates ... sphere x y z radius box x1 y1 z1 x2 y2 z2 cylinder x1 y1 z1 x2 y2 z2 radius point x y z infinite |
infinite | defines the shape of the trigger's active area. the volumeShape can be one of the following:
|
| Event | Variables | Description |
| enter | $user | a user has entered the space |
| exit | $user | a user has left the space |
| firstenter | $user | a user has entered the space |
| empty | all users have left the space |