Represents the user's wand (the controller that isn't the brush controller)
Name | Return Type | Description |
---|---|---|
position | Vector3 Read-only | The 3D position of the Wand Controller |
rotation | Rotation Read-only | The 3D orientation of the Wand |
direction | Vector3 Read-only | The vector representing the forward direction of the wand controller |
pressure | number Read-only | How far the trigger on the wand contrller is pressed in |
speed | Vector3 Read-only | How fast the wand controller is currently moving |
triggerIsPressed | boolean Read-only | Check whether the wand trigger is currently pressed |
triggerPressedThisFrame | boolean Read-only | Check whether the wand trigger was pressed during the current frame |
triggerReleasedThisFrame | boolean Read-only | Check whether the wand trigger was released during the current frame |
timeSincePressed | number Read-only | Time in seconds since the wand trigger was last pressed |
timeSinceReleased | number Read-only | Time in seconds since the wand trigger was last released |
distanceMoved | number Read-only | The distance moved by the wand |
distanceDrawn | number Read-only | The distance drawn by the wand (i.e. distance since the trigger was last pressed) |
Clears the history and sets it's size
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
size | number | The size of the history buffer |
Wand.ResizeHistory(100)
Sets the size of the history. Only clears it if the size has changed
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
size | number | The size of the history buffer |
Wand.SetHistorySize(100)
Recalls previous positions of the Wand from the history buffer
Returns: Vector3
Parameters:
Name | Type | Default | Description |
---|---|---|---|
back | number | How far back in the history to get the position from |
myPosition = Wand.PastPosition(5)
Recalls previous orientations of the Wand from the history buffer
Returns: Rotation
Parameters:
Name | Type | Default | Description |
---|---|---|---|
back | number | How far back in the history to get the rotation from |
myRotation = Wand.PastRotation(5)