Camera Centered Offset

I have it so there is a transparent UI overlay over 25% of the canvas (on the right side), Then on the other 75% of the canvas is the display area where the player will be. The player should be centered in this area.
To do this I used the View Offse:
camera.setViewOffset ( window.innerWidth * 1.25, window.innerHeight, window.innerWidth * 0.25, 0, window.innerWidth, window.innerHeight);

1 Like