Camera – Unity

Camera.orthographicSize Did you know that the camera is half-size when in orthographic mode? Well I didn’t, but now I do. The orthographicSize property defines the viewing volume of an  orthographic  Camera. In order to edit this size, ensure the Camera is first set to orthographic either through script or in the Inspector. The orthographicSize is half … Read more

Mouse Position – Unity

Code to get the Mouse Position in a 2D app Vector3 mPos = Input.mousePosition; mPos.z = -Camera.main.transform.position.z; Vector3 targetPos = Camera.main.ScreenToWorldPoint(mPos);   Then to make something face towards it. yourGameObject.transform.LookAt(targetPos);