
I come from a beginner python background and recently picked up Lua. Im not the best but I want to keep going.
I've so far being using forums on here and sheepolutions guide to understand.
I am trying to make RTS like camera. My problem is where I click, the user does not follow.
This is because of love.graphics.translate. I saw I must reverse the translation but its been a few days and I am really stuck :/
I have found a way to track the offset by measuring the distance of the camera currently from where it started. My problem is changing the click x,y to actually go there. I think it is as simple as adding this offset number to mouse.x, mouse.y but idk... Without the translate it does move to where I want it.
Any help would be awesome! The code is in one file for the sake of learning. I plan to recode it later into seperate files when it works!!
Currently there is a user and a camera. The translation follows the camara. If you press Y the camera will follow the user. If the camera is not following the user and the mouse is within the white boundary area, the camera will move to the mouse. If you are familiar with league of legends, I am trying to make an unlocked camera...
My current goal would be to have a large playable map where the user can move around. I am hoping the playable area can be roughly 3000*3000 but first I must make the movement work....
Press F9 to let your cursor be free of the window.
Please let me know if I can provide any further info
