Skip to content

Commit

Permalink
Maybe fix trouble with bounds (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
3vilWind authored Jan 8, 2021
1 parent d660e0f commit 305e34d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions orthographic/camera.lua
Original file line number Diff line number Diff line change
Expand Up @@ -654,8 +654,8 @@ function M.project(view, projection, world)
assert(world, "You must provide world coordinates to translate")
v4_tmp.x, v4_tmp.y, v4_tmp.z, v4_tmp.w = world.x, world.y, world.z, 1
local v4 = projection * view * v4_tmp
world.x = ((v4.x + 1) / 2) * WINDOW_WIDTH
world.y = ((v4.y + 1) / 2) * WINDOW_HEIGHT
world.x = ((v4.x + 1) / 2) * DISPLAY_WIDTH
world.y = ((v4.y + 1) / 2) * DISPLAY_HEIGHT
world.z = ((v4.z + 1) / 2)
return world
end
Expand Down

0 comments on commit 305e34d

Please sign in to comment.