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: llms-full.txt
+26-19Lines changed: 26 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -6538,26 +6538,33 @@ An alternative way is to update the position of the game object the camera compo
6538
6538
When the camera has panned, zoomed or changed it's projection from the default orthographic Stretch projection the mouse coordinates provided in the `on_input()` lifecycle function will no longer match to the world coordinates of your game objects. You need to manually account for the change in view or projection. The code to convert from mouse/screen coordinates to world coordinates looks like this:
6539
6539
6540
6540
```Lua
6541
-
--- Convert from screen to world coordinates
6542
-
-- @param sx Screen x
6543
-
-- @param sy Screen y
6544
-
-- @param sz Screen z
6545
-
-- @param window_width Width of the window (use render.get_width() or window.get_size().x)
6546
-
-- @param window_height Height of the window (use render.get_height() or window.get_size().y)
Copy file name to clipboardExpand all lines: manuals/camera.md
+26-19Lines changed: 26 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -240,26 +240,33 @@ An alternative way is to update the position of the game object the camera compo
240
240
When the camera has panned, zoomed or changed it's projection from the default orthographic Stretch projection the mouse coordinates provided in the `on_input()` lifecycle function will no longer match to the world coordinates of your game objects. You need to manually account for the change in view or projection. The code to convert from mouse/screen coordinates to world coordinates looks like this:
241
241
242
242
```Lua
243
-
--- Convert from screen to world coordinates
244
-
-- @param sx Screen x
245
-
-- @param sy Screen y
246
-
-- @param sz Screen z
247
-
-- @param window_width Width of the window (use render.get_width() or window.get_size().x)
248
-
-- @param window_height Height of the window (use render.get_height() or window.get_size().y)
0 commit comments