void Start() { aspect = (float)Screen.width / (float)Screen.height; ortho = Matrix4x4.Ortho(-orthographicSize * aspect, orthographicSize * aspect, -orthographicSize, orthographicSize, near, far); perspective = Matrix4x4.Perspective(fov, aspect, near, far); camera.projectionMatrix = perspective; orthoOn = false; blender = (MatrixBlender)GetComponent(typeof(MatrixBlender)); }
void Start() { aspect = (float) Screen.width / (float) Screen.height; ortho = Matrix4x4.Ortho(-orthographicSize * aspect, orthographicSize * aspect, -orthographicSize, orthographicSize, near, far); perspective = Matrix4x4.Perspective(fov, aspect, near, far); camera.projectionMatrix = perspective; orthoOn = false; blender = (MatrixBlender) GetComponent(typeof(MatrixBlender)); }
void Start() { _instance = this; camera = GetComponent <Camera>(); aspect = (float)Screen.width / (float)Screen.height; ortho = Matrix4x4.Ortho(-orthographicSize * aspect, orthographicSize * aspect, -orthographicSize, orthographicSize, near, far); perspective = Matrix4x4.Perspective(fov, aspect, near, far); camera.projectionMatrix = ortho; orthoOn = true; blender = (MatrixBlender)GetComponent(typeof(MatrixBlender)); }
private void Start() { point = target.position; offset = transform.position - target.position; aspect = (float)Screen.width / (float)Screen.height; ortho = Matrix4x4.Ortho(-orthographicSize * aspect, orthographicSize * aspect, -orthographicSize, orthographicSize, near, far); perspective = Matrix4x4.Perspective(fov, aspect, near, far); Camera.main.projectionMatrix = ortho; orthoOn = true; blender = (MatrixBlender)GetComponent(typeof(MatrixBlender)); }
protected override void Awake() { base.Awake(); _MidOrthoSize = _CircleRadius / Screen.width * Screen.height; _CameraMatrixBlender = gameObject.GetComponent <MatrixBlender>(); _CameraMatrixBlender.CaluculateMatrix(_MidOrthoSize, _MaxFOV); UpdateParam(); MakeISM(); }
void Start() { _camera = GetComponent <Camera>(); orthographicSize = _camera.orthographicSize; near = _camera.nearClipPlane; far = _camera.farClipPlane; fov = _camera.fieldOfView; aspect = _camera.aspect; ortho = Matrix4x4.Ortho(-orthographicSize * aspect, orthographicSize * aspect, -orthographicSize, orthographicSize, near, far); perspective = Matrix4x4.Perspective(fov, aspect, near, far); _camera.projectionMatrix = ortho; orthoOn = true; blender = (MatrixBlender)GetComponent(typeof(MatrixBlender)); }
void Start() { aspect = (float)Screen.width / (float)Screen.height; ortho = Matrix4x4.Ortho(-orthographicSize * aspect, orthographicSize * aspect, -orthographicSize, orthographicSize, near, far); perspective = Matrix4x4.Perspective(fov, aspect, near, far); if (HarmonicSerialization.Instance.IsNewGame) { GetComponent<Camera>().projectionMatrix = perspective; StartCoroutine(Wait()); } else GetComponent<Camera>().projectionMatrix = ortho; blender = (MatrixBlender)GetComponent(typeof(MatrixBlender)); }
// Use this for initialization void Start() { world_controller = FindObjectOfType <World> (); blender = gameObject.GetComponent <MatrixBlender> (); // subscribe to worldcontroller events if (world_controller) { world_controller.shiftEvent += Shift; world_controller.shotChangeEvent += ShotChange; } // Prepare the projection matrices based on the camera's settings. Camera cam = Camera.main; pers = Matrix4x4.Perspective(cam.fieldOfView, cam.aspect, cam.nearClipPlane, cam.farClipPlane); ortho = Matrix4x4.Ortho(-cam.orthographicSize * cam.aspect, cam.orthographicSize * cam.aspect, -cam.orthographicSize, cam.orthographicSize, cam.nearClipPlane, cam.farClipPlane); }
void Start() { aspect = (float)Screen.width / (float)Screen.height; _matrixBlender = GetComponent <MatrixBlender>(); }
void Awake() { blender = GetComponent <MatrixBlender>(); }