wandPosition

The wandPosition node gives you the position of the wand, either when it enters or leaves a space, or continuously while it is inside it. You can use this information to control attributes of other nodes, move objects around, or start animations from a certain point.

Example:

wandPosition(volume(infinite),when(inside,print($xpos $ypos $zpos)))

Node Reference

Derived from: ygSpace

Messages

MessageParametersDefaultDescription
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:
  • infinite: the trigger is active throughout the world
  • sphere: x y z is the location of the trigger; radius is the radius of the sphere.
  • box: x1 y1 z1 and x2 y2 z2 define two opposite corners of a box
  • cylinder: x1 y1 z1 and x2 y2 z2 are centers of the ends of the cylinder; radius is the radius of the cylinder.
  • point: x y z is the location of the trigger.

Events

EventVariablesDescription
inside$user $xpos $ypos $zposupdates position constantly while a user is inside.
enter$user $xpos $zposa user has entered the space
exit$user $xpos $ypos $zposa user has left the space
firstenter$usera user has entered the space
empty all users have left the space

(c) Ben Chang