Skip to content

Commit

Permalink
Updated camera.lua (#73)
Browse files Browse the repository at this point in the history
Sorted a issue where it used DISPLAY_WIDTH instead of DISPLAY_HEIGHT for vertical camera shaking

Co-authored-by: Mobjunk <[email protected]>
  • Loading branch information
NighelNijhuis and Mobjunk authored Aug 2, 2024
1 parent a895824 commit 6a76434
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion orthographic/camera.lua
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ function M.update(camera_id, dt)
camera.shake.offset.x = (DISPLAY_WIDTH * camera.shake.intensity) * (math.random() - 0.5)
end
if camera.shake.vertical then
camera.shake.offset.y = (DISPLAY_WIDTH * camera.shake.intensity) * (math.random() - 0.5)
camera.shake.offset.y = (DISPLAY_HEIGHT * camera.shake.intensity) * (math.random() - 0.5)
end
end
end
Expand Down

0 comments on commit 6a76434

Please sign in to comment.