PlayerViewService
Provides a way to get additional information about a player's view.
This class is not replicated. Its interface does not cross the network boundary.
This class is not creatable. Instances of this class cannot be created with Instance.new.
This class is a service. It is a singleton that may be acquired with GetService.
Memory category | Instances |
---|
Member index 4
Description
PlayerViewService provides a way to get additional information about a player's view.
History 5
Members 4
GetDeviceCameraCFrame
Parameters (1) | Default | |
---|---|---|
player | Player | Player |
Returns (1) | ||
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.
See Roblox Connect for a sample implementation of this method.
Thread safety | Unsafe |
---|
History 1
GetDeviceCameraCFrameForSelfView
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
CFrame |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
OnCameraCFrameReplicationRequest
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
UpdateDeviceCFrame
Parameters (3) | Default | |
---|---|---|
player | Player | Player |
cframe | CFrame | Identity |
timestamp | int64 | 0 |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |