Skip to content

Commit 64f5fcd

Browse files
ap4123IgnisRBX
andauthored
Update content/en-us/reference/engine/classes/Camera.yaml
Co-authored-by: IgnisRBX <[email protected]>
1 parent 64b4faf commit 64f5fcd

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

content/en-us/reference/engine/classes/Camera.yaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,14 +1177,20 @@ methods:
11771177
at a given depth from the `Class.Camera`, orientated in the camera's
11781178
direction. Does not account for the `Enum.ScreenInsets|CoreUISafeInsets` inset.
11791179
description: |
1180-
This function creates a unit `Datatype.Ray` from a 2D position in device safe viewport coordinates (defined in pixels). That is, `(0, 0)` corresponds to the top left point of the Roblox top bar.
1180+
This function creates a unit `Datatype.Ray` from a 2D position in device safe viewport coordinates,
1181+
defined in pixels. That is, `(0, 0)` corresponds to the top-left point of the Roblox top bar. The input
1182+
2D position does **not** account for the `Enum.ScreenInsets|CoreUISafeInsets` inset, but it does
1183+
account for any `Enum.ScreenInsets|DeviceSafeInsets`.
11811184
1182-
<img src="/assets/engine-api/classes/Camera/DeviceSafeViewportCoordinates.jpg" width="720" alt="Diagram showing the origin of the device safe area viewport coordinate system." />
1183-
1184-
The input 2D position does **not** account for the Core UI inset, but does account for any device safe insets.
1185-
The `Datatype.Ray` originates from the `Datatype.Vector3` equivalent of the 2D position in the world at the given depth (in studs) away from the `Class.Camera`.
1185+
<img src="../../../assets/engine-api/classes/Camera/DeviceSafeViewportCoordinates.png" width="840" alt="Diagram showing the origin of the device safe area viewport coordinate system." />
1186+
1187+
The `Datatype.Ray` originates from the `Datatype.Vector3` equivalent of the 2D position in the
1188+
world at the given depth (in studs) away from the `Class.Camera`.
11861189
1187-
Note that UI instances use a different coordinate system. `Class.GuiObject.AbsolutePosition` uses the Core UI viewport coordinate system, while this function uses the device safe viewport coordinate system. If you would like to specify position in Core UI coordinates, please use
1190+
Note that UI instances use a different coordinate system. `Class.GuiObject.AbsolutePosition` uses
1191+
the `Enum.ScreenInsets|CoreUISafeInsets` viewport coordinate system, while this function uses the
1192+
`Enum.ScreenInsets|DeviceSafeInsets` viewport coordinate system. If you would like to specify
1193+
position in core UI coordinates, please use
11881194
`Class.Camera:ScreenPointToRay()`.
11891195
11901196
This function only works for the current Workspace camera. Other cameras,

0 commit comments

Comments
 (0)