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
The controller aim pose in world space.
The controller's world-space angular velocity.
The controller grip pose in world space.
The runtime type name.
Whether the controller is connected.
Read-only finger-curl values for Thumb, Index, Middle, Ring, and Pinky.
The analog grip value, from 0 to 1.
The grip-force value reported by the runtime.
The Enum.UserCFrame identifier for this controller's hand.
Whether joint-level hand tracking is available.
The runtime value name.
The pointer's distance to the interface intersection, or nil when no intersection is available.
Whether the controller pointer currently intersects an interface.
The active controller interaction profile identifier.
The thumbstick position, with each axis from -1 to 1.
Whether the controller's grip pose is currently available.
The trackpad position, with each axis from -1 to 1.
The trackpad-force value reported by the runtime.
The analog trigger value, from 0 to 1.
The grip pose relative to the tracking origin.
The controller's world-space linear velocity.
GetFingerCurl(finger: EnumItem): numberReturns the selected finger's tracked or estimated curl value.
Returns the requested hand joint's world-space CFrame, or nil when joint tracking is unavailable.
GetJointRadius(joint: EnumItem): number?Returns the requested joint radius with world scaling applied, or nil when unavailable.
Returns the available hand-joint transforms.
IsA(className: string): booleanReturns whether the value matches the supplied type name.
Returns whether the selected Enum.VRButton is pressed.
Returns whether the selected Enum.VRButton is touched.
StopVibration(): ()Stops vibration on this controller.
Vibrate(amplitude: number, duration: number?, frequency: number?): ()Requests vibration on this controller.
Fires when this controller's button is pressed.
Fires when this controller's button is released.
Fires when this controller's connection state changes.
Fires when this controller's pose-tracking availability changes.
Properties
AimCFrame
VRController.AimCFrame: CFrameThe controller aim pose in world space. Falls back to the grip pose when a separate aim pose is unavailable.
AngularVelocity
VRController.AngularVelocity: Vector3The controller's world-space angular velocity.
CFrame
VRController.CFrame: CFrameThe controller grip pose in world space. Check Tracked before using the pose.
ClassName
VRController.ClassName: stringThe runtime type name.
Connected
VRController.Connected: booleanWhether 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: numberThe analog grip value, from 0 to 1.
GripForce
VRController.GripForce: numberThe grip-force value reported by the runtime.
Hand
VRController.Hand: EnumItemThe Enum.UserCFrame identifier for this controller's hand.
HandTracked
VRController.HandTracked: booleanWhether joint-level hand tracking is available.
Name
VRController.Name: stringThe 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: booleanWhether the controller pointer currently intersects an interface.
Profile
VRController.Profile: stringThe active controller interaction profile identifier.
Thumbstick
VRController.Thumbstick: Vector2The thumbstick position, with each axis from -1 to 1.
Tracked
VRController.Tracked: booleanWhether the controller's grip pose is currently available.
Trackpad
VRController.Trackpad: Vector2The trackpad position, with each axis from -1 to 1.
TrackpadForce
VRController.TrackpadForce: numberThe trackpad-force value reported by the runtime.
Trigger
VRController.Trigger: numberThe analog trigger value, from 0 to 1.
UserCFrame
VRController.UserCFrame: CFrameThe grip pose relative to the tracking origin. Returns an identity transform when the pose is unavailable.
Velocity
VRController.Velocity: Vector3The controller's world-space linear velocity.
Methods
GetFingerCurl
VRController:GetFingerCurl(finger: EnumItem): numberReturns the selected finger's tracked or estimated curl value.
GetJoint
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): booleanReturns whether the value matches the supplied type name.
IsDown
VRController:IsDown(button: EnumItem): booleanReturns whether the selected Enum.VRButton is pressed.
IsTouched
VRController:IsTouched(button: EnumItem): booleanReturns 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: RBXScriptSignalFires when this controller's button is pressed.
ButtonUp
VRController.ButtonUp: RBXScriptSignalFires when this controller's button is released.
ConnectionChanged
VRController.ConnectionChanged: RBXScriptSignalFires when this controller's connection state changes.
TrackingChanged
VRController.TrackingChanged: RBXScriptSignalFires when this controller's pose-tracking availability changes.
Operators
__eq · __tostring · __type