The VTSpatialDirection model defines the direction a participant is facing. The model is specified as a set of three Euler rotations about the corresponding axis. The following properties define a rotation about the specified positive axis:
x: A rotation about the x-axis
y: A rotation about the y-axis
z: A rotation about the z-axis
Yaw: A rotation about the up axis, where the default environment is the y rotation
Pitch: A rotation about the right axis, where the default environment is the x rotation.
Roll: A rotation about the forward axis, where the default environment is the z rotation.
When using custom environment directions set in setSpatialEnvironment, the rotation is defined to always rotate about the relevant axis according to the left handed curl rule. In the animations above you can see, for the y-axis rotation, if you curl your left hand up around with your thumb pointing down the +y axis, the direction the participant will rotate is in the direction the fingers are curling around the given axis. You can see the rotation arrows in those reference animations which correspond to positive rotation direction are pointing the same direction as the fingers of the curled left hand.
When a direction contains rotations around more than one axis, the rotations are applied in a defined order: yaw, pitch, and then roll. With the standard environment, this corresponds to y, x, and then z. When using custom environment directions, the directions are always in the order of yaw/pitch/roll, but which (x,y,z) axis those correspond to is different.
• x: number
The Euler rotation about the x-axis, in degrees.
• y: number
The Euler rotation about the y-axis, in degrees.
• z: number
The Euler rotation about the z-axis, in degrees.
Updated 11 months ago