module/world: return camera coordinate in the right order
This commit is contained in:
parent
a2d38a1ef4
commit
d908604dcb
1 changed files with 2 additions and 2 deletions
|
@ -196,13 +196,13 @@ end
|
||||||
function CameraSystem:getViewCoordinate(id)
|
function CameraSystem:getViewCoordinate(id)
|
||||||
local cam = self:getViewCam(id)
|
local cam = self:getViewCam(id)
|
||||||
|
|
||||||
local camx, camy, camh, camw
|
local camx, camy, camw, camh
|
||||||
camx = cam.x - (self.views.width/2)
|
camx = cam.x - (self.views.width/2)
|
||||||
camy = cam.y - (self.views.height/2)
|
camy = cam.y - (self.views.height/2)
|
||||||
|
|
||||||
camw = self.views.width
|
camw = self.views.width
|
||||||
camh = self.views.height
|
camh = self.views.height
|
||||||
return camx, camy, camh, camw
|
return camx, camy, camw, camh
|
||||||
end
|
end
|
||||||
|
|
||||||
function CameraSystem:getOnScreenViewCoordinate(id)
|
function CameraSystem:getOnScreenViewCoordinate(id)
|
||||||
|
|
Loading…
Reference in a new issue