Skip to content

Commit c880be2

Browse files
authored
Apply suggestions from code review
1 parent 7d51b9b commit c880be2

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,22 +1192,22 @@ methods:
11921192
direction. Does not account for the `Enum.ScreenInsets|CoreUISafeInsets` inset.
11931193
description: |
11941194
This function creates a unit `Datatype.Ray` from a 2D position in device
1195-
safe viewport coordinates,
1196-
defined in pixels. That is, `(0, 0)` corresponds to the top-left point of
1197-
the Roblox top bar. The input 2D position does **not** account for the
1198-
`Enum.ScreenInsets|CoreUISafeInsets` inset, but it does
1199-
account for any `Enum.ScreenInsets|DeviceSafeInsets`.
1195+
safe viewport coordinates, defined in pixels. The ray originates from the
1196+
`Datatype.Vector3` equivalent of the 2D position in the world at the
1197+
given depth (in studs) away from the `Class.Camera`.
1198+
1199+
As illustrated below, `(0, 0)` corresponds to the top‑left point of the Roblox
1200+
top bar. This means that the input 2D position does **not** account for the
1201+
`Enum.ScreenInsets|CoreUISafeInsets` inset, but it does account for any
1202+
`Enum.ScreenInsets|DeviceSafeInsets`.
12001203
12011204
<img src="../../../assets/engine-api/classes/Camera/ViewportPointToRayOrigin.png" width="840" alt="Diagram showing the origin of the device safe area viewport coordinate system." />
12021205
1203-
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
1204-
`Class.Camera`.
1205-
1206-
Note that UI instances use a different coordinate system. `Class.
1207-
GuiObject.AbsolutePosition` uses
1208-
the `Enum.ScreenInsets|CoreUISafeInsets` viewport coordinate system,
1209-
while this function uses the
1210-
`Enum.ScreenInsets|DeviceSafeInsets` viewport coordinate system. If you
1206+
Note that UI instances use a different coordinate system
1207+
(`Class.GuiObject.AbsolutePosition` uses the
1208+
`Enum.ScreenInsets|CoreUISafeInsets` viewport coordinate system
1209+
while this function uses the `Enum.ScreenInsets|DeviceSafeInsets`
1210+
viewport coordinate system). If you
12111211
would like to specify position in core UI coordinates, please use
12121212
`Class.Camera:ScreenPointToRay()`.
12131213

0 commit comments

Comments
 (0)