private void SetWheelShadowCamera() { _shadowSize = _carHelper.GetWheelShadowSize() * (1f + 2f * WheelPadding / WheelSize); var size = Math.Max(_shadowSize.X, _shadowSize.Z) * 2f; _shadowCamera = new CameraOrtho { Width = size, Height = size, NearZ = 0.001f, FarZ = size + 20f }; _shadowCamera.SetLens(1f); _shadowDestinationTransform = Matrix.Scaling(new Vector3(-_shadowSize.X, _shadowSize.Y, _shadowSize.Z)) * Matrix.RotationY(MathF.PI); }
public CameraOrthoShadow() { _innerCamera = new CameraOrtho(); _innerCamera.SetLens(1f); }
private void SetBodyShadowCamera() { _shadowSize = _ambientBodyShadowSize * (1f + 2f * BodyPadding / BodySize); var size = Math.Max(_shadowSize.X, _shadowSize.Z) * 2f; _shadowCamera = new CameraOrtho { Width = size, Height = size, NearZ = 0.001f, FarZ = size + 20f }; _shadowCamera.SetLens(1f); _shadowDestinationTransform = Matrix.Scaling(new Vector3(-_shadowSize.X, _shadowSize.Y, _shadowSize.Z)) * Matrix.RotationY(MathF.PI); }