From 64f5fcde337297a8ef560ac1d5d64214d1a46dbd Mon Sep 17 00:00:00 2001 From: Alex <73556282+ap4123@users.noreply.github.com> Date: Fri, 1 Nov 2024 10:55:26 -0700 Subject: [PATCH] Update content/en-us/reference/engine/classes/Camera.yaml Co-authored-by: IgnisRBX <43388550+IgnisRBX@users.noreply.github.com> --- .../en-us/reference/engine/classes/Camera.yaml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/content/en-us/reference/engine/classes/Camera.yaml b/content/en-us/reference/engine/classes/Camera.yaml index 82b2aeaf0..e19791f2f 100644 --- a/content/en-us/reference/engine/classes/Camera.yaml +++ b/content/en-us/reference/engine/classes/Camera.yaml @@ -1177,14 +1177,20 @@ methods: at a given depth from the `Class.Camera`, orientated in the camera's direction. Does not account for the `Enum.ScreenInsets|CoreUISafeInsets` inset. description: | - 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. + 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. The input + 2D position does **not** account for the `Enum.ScreenInsets|CoreUISafeInsets` inset, but it does + account for any `Enum.ScreenInsets|DeviceSafeInsets`. - Diagram showing the origin of the device safe area viewport coordinate system. - - The input 2D position does **not** account for the Core UI inset, but does account for any device safe insets. - 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`. + Diagram showing the origin of the device safe area viewport coordinate system. + + 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`. - 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 + Note that UI instances use a different coordinate system. `Class.GuiObject.AbsolutePosition` uses + the `Enum.ScreenInsets|CoreUISafeInsets` viewport coordinate system, while this function uses the + `Enum.ScreenInsets|DeviceSafeInsets` viewport coordinate system. If you would like to specify + position in core UI coordinates, please use `Class.Camera:ScreenPointToRay()`. This function only works for the current Workspace camera. Other cameras,