I'm having issues constraining my main camera in the game. This camera follows the character around.
I need it to clamp from the beginning to the beginning to the end of the game, resolution/aspect ratio independent.
Right now I have fixed numbers clamping the camera, which isn't good because it doesn't work well across multiple displays.
transform.position = new Vector3(Mathf.Clamp(transform.position.x, leftOffset, rightOffset), transform.position.y, transform.position.z);
I also tried using empty game objects and that didn't work either.
I currently have a wildcard on my 2D toolkit camera (if that helps):
Match by: wildcard
Autoscale: Fit to height
Fit mode: Center
Any help would be much appreciated!