diff --git a/gamecore/modules/world/camera.lua b/gamecore/modules/world/camera.lua index d7f6e43..263e4db 100644 --- a/gamecore/modules/world/camera.lua +++ b/gamecore/modules/world/camera.lua @@ -177,7 +177,9 @@ function CameraSystem:attachView(id) if (id ~= nil) then local cam = self:getViewCam(id) + local viewx, viewy, vieww, viewh = self:getOnScreenViewCoordinate(id) cam:attach() + love.graphics.setScissor(viewx, viewy, vieww, viewh) end end @@ -185,6 +187,7 @@ function CameraSystem:detachView(id) if (id ~= nil) then local cam = self:getViewCam(id) + love.graphics.setScissor( ) cam:detach() end end