public void Save(Camera camera)
        {
            var cameraState = SgtCameraState.Find(ref cameraStates, camera);

            cameraState.LocalPosition = transform.localPosition;
            cameraState.LocalRotation = transform.localRotation;
            cameraState.LocalScale    = transform.localScale;
        }
Example #2
0
        private void CameraPreCull(Camera camera)
        {
            var cameraState = SgtCameraState.Find(ref cameraStates, camera);

            transform.localScale = MaxScale * cameraState.Value;

            // Store scale
            cameraState.LocalScale = transform.localScale;
        }
Example #3
0
		private void CameraPreCull(Camera camera)
		{
			var cameraState = SgtCameraState.Find(ref cameraStates, camera);
			var eye         = camera.transform.position;
			var tgt         = transform.position;
			var occlusion   = SgtOcclusion.Calculate(layers, new Vector4(eye.x, eye.y, eye.z, 0.0f), new Vector4(tgt.x, tgt.y, tgt.z, radius));

			transform.localScale = maxScale * Mathf.Clamp01(1.0f - occlusion);

			// Store scale
			cameraState.LocalScale = transform.localScale;
		}
        private void Save(Camera camera)
        {
            var cameraState = SgtCameraState.Find(ref cameraStates, camera);

            cameraState.LocalRotation = transform.localRotation;
        }