SpatialDirection

The SpatialDirection model defines the direction a participant is facing. The model is specified as a set of three Euler rotations about the corresponding axis in the order of z-x-y:

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

These properties correspond to yaw, pitch, and roll:

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.

Properties

x

x: number

The Euler rotation about the x-axis, in degrees.


y

y: number

The Euler rotation about the y-axis, in degrees.


z

z: number

The Euler rotation about the z-axis, in degrees.


Did this page help you?