Skip to content

Commit 305e34d

Browse files
authored
Maybe fix trouble with bounds (#37)
1 parent d660e0f commit 305e34d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

orthographic/camera.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -654,8 +654,8 @@ function M.project(view, projection, world)
654654
assert(world, "You must provide world coordinates to translate")
655655
v4_tmp.x, v4_tmp.y, v4_tmp.z, v4_tmp.w = world.x, world.y, world.z, 1
656656
local v4 = projection * view * v4_tmp
657-
world.x = ((v4.x + 1) / 2) * WINDOW_WIDTH
658-
world.y = ((v4.y + 1) / 2) * WINDOW_HEIGHT
657+
world.x = ((v4.x + 1) / 2) * DISPLAY_WIDTH
658+
world.y = ((v4.y + 1) / 2) * DISPLAY_HEIGHT
659659
world.z = ((v4.z + 1) / 2)
660660
return world
661661
end

0 commit comments

Comments
 (0)