Open Asterune
VRController

VRController

Reports one VR controller's pose, buttons, hand tracking, and haptics.

Behavior

VRController reports one VR controller's pose, buttons, hand tracking, and haptics.

Summary

Members34
Properties21
Methods9
Events4

Properties

AimCFrame

VRController.AimCFrame: CFrame

The controller aim pose in world space. Falls back to the grip pose when a separate aim pose is unavailable.

AngularVelocity

VRController.AngularVelocity: Vector3

The controller's world-space angular velocity.

CFrame

VRController.CFrame: CFrame

The controller grip pose in world space. Check Tracked before using the pose.

ClassName

VRController.ClassName: string

The runtime type name.

Connected

VRController.Connected: boolean

Whether the controller is connected.

Fingers

VRController.Fingers: { Thumb: number, Index: number, Middle: number, Ring: number, Pinky: number }

Read-only finger-curl values for Thumb, Index, Middle, Ring, and Pinky. Uses tracked curls when available; otherwise estimates curls from touch and button state.

Grip

VRController.Grip: number

The analog grip value, from 0 to 1.

GripForce

VRController.GripForce: number

The grip-force value reported by the runtime.

Hand

VRController.Hand: EnumItem

The Enum.UserCFrame identifier for this controller's hand.

HandTracked

VRController.HandTracked: boolean

Whether joint-level hand tracking is available.

Name

VRController.Name: string

The runtime value name.

PointerDistance

VRController.PointerDistance: number?

The pointer's distance to the interface intersection, or nil when no intersection is available.

PointerOnGui

VRController.PointerOnGui: boolean

Whether the controller pointer currently intersects an interface.

Profile

VRController.Profile: string

The active controller interaction profile identifier.

Thumbstick

VRController.Thumbstick: Vector2

The thumbstick position, with each axis from -1 to 1.

Tracked

VRController.Tracked: boolean

Whether the controller's grip pose is currently available.

Trackpad

VRController.Trackpad: Vector2

The trackpad position, with each axis from -1 to 1.

TrackpadForce

VRController.TrackpadForce: number

The trackpad-force value reported by the runtime.

Trigger

VRController.Trigger: number

The analog trigger value, from 0 to 1.

UserCFrame

VRController.UserCFrame: CFrame

The grip pose relative to the tracking origin. Returns an identity transform when the pose is unavailable.

Velocity

VRController.Velocity: Vector3

The controller's world-space linear velocity.

Methods

GetFingerCurl

VRController:GetFingerCurl(finger: EnumItem): number

Returns the selected finger's tracked or estimated curl value.

GetJoint

VRController:GetJoint(joint: EnumItem): CFrame?

Returns the requested hand joint's world-space CFrame, or nil when joint tracking is unavailable.

GetJointRadius

VRController:GetJointRadius(joint: EnumItem): number?

Returns the requested joint radius with world scaling applied, or nil when unavailable.

GetJoints

VRController:GetJoints(): { CFrame }

Returns the available hand-joint transforms.

IsA

VRController:IsA(className: string): boolean

Returns whether the value matches the supplied type name.

IsDown

VRController:IsDown(button: EnumItem): boolean

Returns whether the selected Enum.VRButton is pressed.

IsTouched

VRController:IsTouched(button: EnumItem): boolean

Returns whether the selected Enum.VRButton is touched.

StopVibration

VRController:StopVibration(): ()

Stops vibration on this controller.

Vibrate

VRController:Vibrate(amplitude: number, duration: number?, frequency: number?): ()

Requests vibration on this controller. Duration is in seconds; frequency is in hertz.

Events

ButtonDown

VRController.ButtonDown: RBXScriptSignal

Fires when this controller's button is pressed.

ButtonUp

VRController.ButtonUp: RBXScriptSignal

Fires when this controller's button is released.

ConnectionChanged

VRController.ConnectionChanged: RBXScriptSignal

Fires when this controller's connection state changes.

TrackingChanged

VRController.TrackingChanged: RBXScriptSignal

Fires when this controller's pose-tracking availability changes.

Operators

__eq · __tostring · __type

Used by

VRService