You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en-us/reference/engine/classes/Camera.yaml
+13-13Lines changed: 13 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -1192,22 +1192,22 @@ methods:
1192
1192
direction. Does not account for the `Enum.ScreenInsets|CoreUISafeInsets` inset.
1193
1193
description: |
1194
1194
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`.
1200
1203
1201
1204
<img src="../../../assets/engine-api/classes/Camera/ViewportPointToRayOrigin.png" width="840" alt="Diagram showing the origin of the device safe area viewport coordinate system." />
1202
1205
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
1211
1211
would like to specify position in core UI coordinates, please use
0 commit comments