VRService
Reports VR session state, tracked poses, controllers, and locomotion settings.
- Service
game:GetService("VRService")- Inherits
- Instance
- Replication
- Never
Behavior
VRService reports VR session state, tracked poses, controllers, and locomotion settings.
Summary
Whether VR world scaling follows the automatic scaling policy.
Whether tracked VR gestures are applied to the avatar.
The strength of the comfort vignette used during movement.
Whether the engine renders the controller models.
The hand selected for primary VR interaction.
The configured eye height used by VR positioning.
Whether the view fades when the VR camera intersects geometry.
The world-space transform of the VR interface panel.
The dimensions of the VR interface panel.
Whether the VR interface panel is displayed.
The tint applied to the rendered VR hands.
The tracked head's world-space angular velocity.
The tracked head transform in world space.
The tracked head's world-space linear velocity.
The controller-pointer mode used for interface interaction.
The live VRController interface for the left hand.
Whether movement uses continuous locomotion or teleportation.
Whether locomotion direction follows the head or hand pose.
The transform mapping the VR tracking origin into world space.
The reported physical play-area dimensions.
The current headset refresh rate, in hertz.
The live VRController interface for the right hand.
Fires when the Humanoid's seated state changes.
The current VR session lifecycle state.
The angular speed used for smooth turning.
The rotation applied by each snap turn, in degrees.
Whether the third-person VR follow camera is enabled.
Whether turning uses snap rotation, smooth rotation, or no input rotation.
Whether the runtime reports that the user is wearing the headset.
Whether a VR device is available to the runtime.
The name reported by the active VR runtime.
Whether a VR session is enabled for the current client.
The world-space scale applied to tracked VR positions.
Returns the VRController for the selected hand.
Returns this instance if it is an ExecutionGroup.
Returns the refresh rates supported by the VR runtime, in hertz.
Returns the input interpretation mode for the selected touchpad.
Returns the requested pose relative to the VR tracking origin.
Returns whether the requested pose is currently tracked.
Returns the requested tracked pose transformed into world space.
Repositions the VR interface panel relative to the current view.
Requests recentering of the headset's tracking origin.
Requests navigation using the supplied VR navigation options.
Requests a supported headset refresh rate, in hertz.
Sets the input interpretation mode for the selected touchpad.
Stops vibration on the selected controller or controllers.
Applies the supplied yaw rotation, in degrees.
Requests controller vibration with the supplied amplitude, duration, and frequency.
Fires when a controller button is pressed.
Fires when a controller button is released.
Fires when a VR controller connects.
Fires when a VR controller disconnects.
Fires when VR navigation is requested.
Fires after the VR view is recentered.
Fires when the VR session state changes.
Fires when a touchpad interpretation mode changes.
Fires when a tracked user-space pose changes.
Fires when the availability of a tracked pose changes.
Fires when headset user presence changes.
Properties
AutomaticScaling
VRService.AutomaticScaling: EnumItemWhether VR world scaling follows the automatic scaling policy.
AvatarGestures
VRService.AvatarGestures: booleanWhether tracked VR gestures are applied to the avatar.
ComfortVignette
VRService.ComfortVignette: numberThe strength of the comfort vignette used during movement.
ControllerModelsVisible
VRService.ControllerModelsVisible: booleanWhether the engine renders the controller models.
DominantHand
VRService.DominantHand: EnumItemThe hand selected for primary VR interaction.
EyeHeight
VRService.EyeHeight: numberThe configured eye height used by VR positioning.
FadeOutViewOnCollision
VRService.FadeOutViewOnCollision: booleanWhether the view fades when the VR camera intersects geometry.
GuiPanelCFrame
VRService.GuiPanelCFrame: CFrameThe world-space transform of the VR interface panel.
GuiPanelSize
VRService.GuiPanelSize: Vector2The dimensions of the VR interface panel.
GuiPanelVisible
VRService.GuiPanelVisible: booleanWhether the VR interface panel is displayed.
HandColor
VRService.HandColor: Color3The tint applied to the rendered VR hands.
HeadAngularVelocity
VRService.HeadAngularVelocity: Vector3The tracked head's world-space angular velocity.
HeadCFrame
VRService.HeadCFrame: CFrameThe tracked head transform in world space.
HeadVelocity
VRService.HeadVelocity: Vector3The tracked head's world-space linear velocity.
LaserPointer
VRService.LaserPointer: EnumItemThe controller-pointer mode used for interface interaction.
LeftHand
VRService.LeftHand: VRControllerThe live VRController interface for the left hand.
LocomotionMode
VRService.LocomotionMode: EnumItemWhether movement uses continuous locomotion or teleportation.
MovementDirection
VRService.MovementDirection: EnumItemWhether locomotion direction follows the head or hand pose.
OriginCFrame
VRService.OriginCFrame: CFrameThe transform mapping the VR tracking origin into world space.
PlayAreaSize
VRService.PlayAreaSize: Vector2The reported physical play-area dimensions.
RefreshRate
VRService.RefreshRate: numberThe current headset refresh rate, in hertz.
RightHand
VRService.RightHand: VRControllerThe live VRController interface for the right hand.
Seated
VRService.Seated: booleanFires when the Humanoid's seated state changes.
SessionState
VRService.SessionState: EnumItemThe current VR session lifecycle state.
SmoothTurnSpeed
VRService.SmoothTurnSpeed: numberThe angular speed used for smooth turning.
SnapTurnAngle
VRService.SnapTurnAngle: numberThe rotation applied by each snap turn, in degrees.
ThirdPersonFollowCamEnabled
VRService.ThirdPersonFollowCamEnabled: booleanWhether the third-person VR follow camera is enabled.
TurnMode
VRService.TurnMode: EnumItemWhether turning uses snap rotation, smooth rotation, or no input rotation.
UserPresent
VRService.UserPresent: booleanWhether the runtime reports that the user is wearing the headset.
VRDeviceAvailable
VRService.VRDeviceAvailable: booleanWhether a VR device is available to the runtime.
VRDeviceName
VRService.VRDeviceName: stringThe name reported by the active VR runtime.
VREnabled
VRService.VREnabled: booleanWhether a VR session is enabled for the current client.
WorldScale
VRService.WorldScale: numberThe world-space scale applied to tracked VR positions.
Methods
GetController
VRService:GetController(hand: EnumItem): VRControllerReturns the VRController for the selected hand.
GetExecutionGroup
VRService:GetExecutionGroup(): ExecutionGroup?Returns this instance if it is an ExecutionGroup. Otherwise returns the nearest ancestor ExecutionGroup, or nil when no group contains the instance.
GetRefreshRates
VRService:GetRefreshRates(): { number }Returns the refresh rates supported by the VR runtime, in hertz.
GetTouchpadMode
Returns the input interpretation mode for the selected touchpad.
GetUserCFrame
Returns the requested pose relative to the VR tracking origin.
GetUserCFrameEnabled
VRService:GetUserCFrameEnabled(type: EnumItem): booleanReturns whether the requested pose is currently tracked.
GetWorldCFrame
Returns the requested tracked pose transformed into world space.
RecenterGuiPanel
VRService:RecenterGuiPanel(): ()Repositions the VR interface panel relative to the current view.
RecenterUserHeadCFrame
VRService:RecenterUserHeadCFrame(): ()Requests recentering of the headset's tracking origin.
RequestNavigation
Requests navigation using the supplied VR navigation options.
RequestRefreshRate
VRService:RequestRefreshRate(hertz: number): ()Requests a supported headset refresh rate, in hertz.
SetTouchpadMode
Sets the input interpretation mode for the selected touchpad.
StopVibration
VRService:StopVibration(hand: EnumItem?): ()Stops vibration on the selected controller or controllers.
Turn
VRService:Turn(degrees: number): ()Applies the supplied yaw rotation, in degrees.
Vibrate
VRService:Vibrate(hand: EnumItem, amplitude: number, duration: number?, frequency: number?): ()Requests controller vibration with the supplied amplitude, duration, and frequency.
Events
ButtonDown
VRService.ButtonDown: RBXScriptSignalFires when a controller button is pressed.
ButtonUp
VRService.ButtonUp: RBXScriptSignalFires when a controller button is released.
ControllerConnected
VRService.ControllerConnected: RBXScriptSignalFires when a VR controller connects.
ControllerDisconnected
VRService.ControllerDisconnected: RBXScriptSignalFires when a VR controller disconnects.
NavigationRequested
VRService.NavigationRequested: RBXScriptSignalFires when VR navigation is requested.
Recentered
VRService.Recentered: RBXScriptSignalFires after the VR view is recentered.
SessionStateChanged
VRService.SessionStateChanged: RBXScriptSignalFires when the VR session state changes.
TouchpadModeChanged
VRService.TouchpadModeChanged: RBXScriptSignalFires when a touchpad interpretation mode changes.
UserCFrameChanged
VRService.UserCFrameChanged: RBXScriptSignalFires when a tracked user-space pose changes.
UserCFrameEnabled
VRService.UserCFrameEnabled: RBXScriptSignalFires when the availability of a tracked pose changes.
UserPresenceChanged
VRService.UserPresenceChanged: RBXScriptSignalFires when headset user presence changes.
Inherited members
- Properties
- ArchivableClassNameNameParent
- Methods
- AddComponent()AddTag()ClearAllChildren()ClearTags()Clone()Destroy()FindFirstAncestor()FindFirstAncestorOfClass()FindFirstAncestorWhichIsA()FindFirstChild()FindFirstChildOfClass()FindFirstChildWhichIsA()FindFirstDescendant()GetAttribute()GetAttributeChangedSignal()GetAttributes()GetChildren()GetComponent()GetComponentChangedSignal()GetComponents()GetDebugId()GetDescendants()GetFullName()GetPropertyChangedSignal()GetReferencing()GetTags()HasComponent()HasTag()IsA()IsAncestorOf()IsDescendantOf()RemoveComponent()RemoveTag()SetAttribute()WaitForChild()
- Events
- AncestryChangedAttributeChangedChangedChildAddedChildRemovedDescendantAddedDescendantRemovingDestroying