Camera Coordinates
Posted: Sat Feb 20, 2021 10:59 pm
by baenyth
Is there a way to use the coordinates of the camera? Such as have NPCs positioned in terms of the camera? Thanks in advance.
Re: Camera Coordinates
Posted: Sun Feb 21, 2021 6:15 am
by Hoeloe
You can just use "camera.x" and "camera.y" in your Lua code, but note that these will be one frame behind in functions other than onDraw, onCameraDraw, or onDrawEnd, and onCameraUpdate may be affected by other Lua code, so you should try to make sure you use onDraw or onCameraDraw.