Roblox UtilitiesDevlHub Roblox Documentation

Class

PlayerViewService

NotCreatableServiceNotReplicated
Inherits
Instance › Object
Memory category
Instances

Provides a way to get additional information about a player's view.

PlayerViewService provides a way to get additional information about a player's view.

Methods 1#

GetDeviceCameraCFrameReturns a world space CFrame looking at the player's character.

GetDeviceCameraCFrame(player: Player = nil): CFrame#

Returns a world space CFrame looking at the player's character, such that setting the current camera's CFrame will view that character from the perspective of their device.

This method leverages the device's camera and it only functions on mobile devices. If no information is available, for example the user is not on a mobile device or they don't have their camera turned on, this method returns a CFrame.identity.

NameTypeDefaultDescription
playerPlayernilThe player for which to get the device camera CFrame.
Returns

Inherited members#

Inherited from Instance 58
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed