Hi, I'd like my 2dtoolkit camera to always stay within the borders of a background (made of multiple game objects), also if I zoom in and out, keeping the pixel perfect view.
My camera setup is the following:
https://www.dropbox.com/s/4wlh9pcj2pd1qym/camera.png?dl=0Let me know if the setup can be adjusted. The basic element of my game is a Unity Sprite of 64 x 64 pixels.
That said. I know the position of the bottom left element (that is a gameobject with 64x64 sprite) and the top right (same type of game Object is a 64x64 sprite).
Example:
https://www.dropbox.com/s/j3iwg5fotwc4kjz/Tile.png?dl=0The position of these elements may change depending on the scene level. But they will stay fixed for all the scene, so I need to adjust this just after each level loading.
How can I clamp the camera between these 2 gameobjects (to avoid showing outside elements in the view)?
How is the best way to zoom in and out without losing the pixel perfect? (ex. changing the zoom factor or the ortographic size).
Thank you very much in advance.