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

P#147431 2024-04-27 14:04 ( Edited 2024-04-27 14:04)


you can do


--put the stuff you want to camera


--put your  UI there
P#147435 2024-04-27 14:13 ( Edited 2024-04-27 14:17)

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

P#147437 2024-04-27 15:26

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

P#147462 2024-04-27 22:02

[Please log in to post a comment]