Wand

Summary

Represents the user's wand (the controller that isn't the brush controller)

Class Properties

NameReturn TypeDescription

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:

NameTypeDefaultDescription

size

number

The size of the history buffer

Example

Wand.ResizeHistory(100)

Wand:SetHistorySize(size)

Sets the size of the history. Only clears it if the size has changed

Returns: nil

Parameters:

NameTypeDefaultDescription

size

number

The size of the history buffer

Example

Wand.SetHistorySize(100)

Wand:PastPosition(back)

Recalls previous positions of the Wand from the history buffer

Returns: Vector3

Parameters:

NameTypeDefaultDescription

back

number

How far back in the history to get the position from

Example

myPosition = Wand.PastPosition(5)

Wand:PastRotation(back)

Recalls previous orientations of the Wand from the history buffer

Returns: Rotation

Parameters:

NameTypeDefaultDescription

back

number

How far back in the history to get the rotation from

Example

myRotation = Wand.PastRotation(5)

Last updated