Wand
Summary
Represents the user's wand (the controller that isn't the brush controller)
Class Properties
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 contrller 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 |
Class Methods
Wand:ResizeHistory(size)
Clears the history and sets it's size
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
size | number | The size of the history buffer |
Example
Wand:SetHistorySize(size)
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 |
Example
Wand:PastPosition(back)
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 |
Example
Wand:PastRotation(back)
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 |
Example
Last updated