Skip to content
Merged
Changes from 3 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
51a1a56
commit
ap4123 Oct 31, 2024
5520c95
Add link
ap4123 Oct 31, 2024
7fc900e
fix typo
ap4123 Oct 31, 2024
1a46f82
Apply suggestions from code review
IgnisRBX Oct 31, 2024
af5857f
Add ViewportFrame info
ap4123 Oct 31, 2024
c178880
edits
ap4123 Oct 31, 2024
c965075
Also update Camera.ViewportPointToRay
ap4123 Nov 1, 2024
21b70c9
Merge branch 'main' into addCameraSafeAreaInfo
ap4123 Nov 1, 2024
fd55969
Apply suggestions from code review
IgnisRBX Nov 1, 2024
64b4faf
Update content/en-us/reference/engine/classes/Camera.yaml
IgnisRBX Nov 1, 2024
64f5fcd
Update content/en-us/reference/engine/classes/Camera.yaml
ap4123 Nov 1, 2024
cf4d2e7
Update content/en-us/reference/engine/classes/Camera.yaml
ap4123 Nov 1, 2024
d891dea
line wrapping
ap4123 Nov 1, 2024
2cb9e82
Add new images.
ap4123 Nov 1, 2024
d1b3e03
Merge branch 'main' into addCameraSafeAreaInfo
IgnisRBX Nov 1, 2024
5e979c7
Update content/en-us/reference/engine/classes/Camera.yaml
IgnisRBX Nov 1, 2024
dbe9b86
Update content/en-us/reference/engine/classes/Camera.yaml
IgnisRBX Nov 1, 2024
7945a09
Update content/en-us/reference/engine/classes/Camera.yaml
IgnisRBX Nov 1, 2024
2d5fb85
Update content/en-us/reference/engine/classes/Camera.yaml
IgnisRBX Nov 1, 2024
1b632a5
Update content/en-us/reference/engine/classes/Camera.yaml
IgnisRBX Nov 1, 2024
0ef1564
Apply suggestions from code review
IgnisRBX Nov 1, 2024
22dc848
Update content/en-us/reference/engine/classes/Camera.yaml
IgnisRBX Nov 1, 2024
7d51b9b
Update content/en-us/reference/engine/classes/Camera.yaml
IgnisRBX Nov 1, 2024
c880be2
Apply suggestions from code review
IgnisRBX Nov 1, 2024
3c30d2f
Apply suggestions from code review
IgnisRBX Nov 1, 2024
be29a08
Update Camera.yaml
IgnisRBX Nov 1, 2024
d338a1d
Merge branch 'main' into addCameraSafeAreaInfo
IgnisRBX Nov 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 21 additions & 7 deletions content/en-us/reference/engine/classes/Camera.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ properties:
viewport to its opposite corner) the camera can view. See
`Class.Camera.FieldOfView|FieldOfView` for a more general explanation of
field of view.

Note: the `Class.Camera.DiagonalFieldOfView` property represents the field of view that is visible by the `Class.Camera` rendering into the fullscreen area. The fullscreen area may be occluded by notches or screen cutouts on some devices. See `Class.Camera.ViewportSize` for more information.
code_samples:
type: float
tags:
Expand Down Expand Up @@ -271,6 +273,8 @@ properties:
using binoculars.
- Increasing FOV when the player is "sprinting" to give the impression of
a lack of control.

Note: the `Class.Camera.FieldOfView` property represents the field of view that is visible by the `Class.Camera` rendering into the fullscreen area. The fullscreen area may be occluded by notches or screen cutouts on some devices. See `Class.Camera.ViewportSize` for more information.
code_samples:
type: float
tags: []
Expand Down Expand Up @@ -534,15 +538,25 @@ properties:
writeCapabilities: []
- name: Camera.ViewportSize
summary: |
Describes the dimensions, in pixels, of the client's viewport.
The dimensions of the device safe area rectangle on a Roblox client.
The units are in Roblox UI offset units, which may be different from
native display pixels.
description: |
**ViewportSize** describes the dimensions, in pixels, of the client's
viewport.
The device safe area rectangle includes the Roblox top bar area, but does not include any display cutouts.

<img src="../../../assets/engine-api/enums/ScreenInsets/DeviceSafeInsets.png" width="840"
alt="Mobile device screen with cutout showing device safe area." />

Note: `Class.Camera.ViewportSize` is not equal to the fullscreen area size on displays with cutouts or notches. To obtain the fullscreen area size on all displays, you can query the `AbsoluteSize` property of a `Class.ScreenGui` with `ScreenInsets=None`. See `Enum.ScreenInsets` for a more information about how screen areas are defined.

<img src="../../../assets/engine-api/enums/ScreenInsets/None.png" width="840"
alt="Mobile device screen with cutout showing fullscreen area." />

`Class.Camera.ViewportSize` is not equal to the fullscreen size in order to improve cross-platform compatibility and backwards compatibility with legacy experiences.

This property ignores the GUI inset applied by the top bar, meaning the
center of the screen can be found at precisely at 50% of the viewport in
both directions. You can find the position of a `Datatype.Vector3` in the
world on the viewport using `Class.Camera:WorldToViewportPoint()`.
Note: `Class.Camera.ViewportSize` is not the actual viewport size the camera uses for rendering. The Camera renders in the fullscreen area. Also the `Class.Camera.FieldOfView` and `Class.Camera.DiagonalFieldOfView` properties are based on the fullscreen area, not `Class.Camera.ViewportSize`.

To learn more about how your experience will run on a device with notches/cutouts, please see [this post](https://devforum.roblox.com/t/notched-screen-support-full-release/2074324/1).
code_samples:
type: Vector2
tags:
Expand Down
Loading