diff --git a/gamecore/modules/world/camera.lua b/gamecore/modules/world/camera.lua index 7df4622..2d889f2 100644 --- a/gamecore/modules/world/camera.lua +++ b/gamecore/modules/world/camera.lua @@ -218,6 +218,17 @@ function CameraSystem:getOnScreenViewCoordinate(id) return viewx, viewy, vieww, viewh end +function CameraSystem:getOnScreenViewRelativePosition(id) + local view = self:getView(id) + + local viewx, viewy + local basex, basey = (self.views.basewidth / 2), (self.views.baseheight / 2) + viewx = view.pos.onScreen.x + viewy = view.pos.onScreen.y + + return viewx, viewy +end + function CameraSystem:getOnScreenViewCenter(id) local view = self:getView(id)