Ah, yea I’ve been thinking about that as well.
I haven’t been peeking at Dusk files that much, but if you go to Dusk—>dusk_core—>run , you can find a .lua file named “camera”.
That is probably where the main camera code is written.
I’ve tried reading the code there and it’s well commented, so if you take some time, you’ll understand it eventually (it’s just lua).
At line 232, you’ll see a comment " Get/ Set Viewpoint".
It looks like this:
function map.setViewpoint(x, y) tprint.add("Set Camera Viewpoint") local x, y = getXY(x, y) camera.viewX, camera.viewY = x, y tprint.remove() end
If you want to center the camera a bit left from the player, you should change this line:
camera.viewX, camera.viewY = x -100, y
In this case I moved it 100 pixels to the left.
You can add more or less, whatever suits your game.
Same for y value.
Sorry for late reply.
This has worked for me…there may be other ways to do it, but I haven’t taken enough time to understand all the code yet.
Caleb P will know for sure.
Anyways I hope this helped…