Log In  


I've been using the camera(x,y) function to move my camera viewport but now I can't do UI because print() and such work off world coordinates rather than screen coordinates, is there something that would allow me to offset coordinates from the camera position?
Something like screen.x, camera.x, etc



1

you can do

camera(x,y)

--put the stuff you want to camera

camera()

--put your  UI there

Thank you, that helps with drawing UI, but now I'm running into other weird stuff with mouse() and mget()

These functions seem to work off absolute values, so mouse 0,0 would correspond to map tile 0,0 but that's not the tile that's being currently drawn under the mouse when the camera shifts, I would still need to compensate for the new offset in order to grab information about the real tile under the mouse, but I still don't know how to do that


1

Not sure I'm following but if you have camera(cam_x, cam_y) then cam_x and cam_y are your offsets.

e.g. x = cam_x + pl.x



[Please log in to post a comment]