I want to have game space predefined depending on a platform, for example a rectangle space will be the game space, this will be the size of the display. User should be able to view the entire game space in birds eye view.
I am very new to Unity.
Wondering if this is set on camera level.
Please help
The camera would be a good place to limit how far the player can see in a direction. In a code I have used before the function that moves the camera has a Mathf.Clamp in it to keep the screen ‘clamped’ between the min and max positions of the board. A code like this was attached to the update section of the camera script.
Void Update(){
float mouseX = Input.mousePosition.x;
float mouseY = Input.mousePosition.y;
Vector3 cameraMouse = new Vector3 (mouseX, mouseY, currentCameraHeight);
cameraMouse = new Vector3 (Mathf.Clamp(cameraMouse.x, -mapSize, mapSize), Mathf.Clamp(cameraMouse.y, -mapSize, mapSize), currentCameraHeight);
mainCamera.transform.position = Vector3.Lerp (mainCamera.transform.position, cameraMouse * Time.deltaTime, (Time.deltaTime * smoothSpeed));
mainCamera.transform.position = new Vector3(mainCamera.transform.position.x, mainCamera.transform.position.y, currentCameraHeight);
You would still have to define some of the variables to use it properly, but it is a place to start.