private void SetCameraBehavior(Camera.Behavior behavior) { this.Renderer.Camera.CurrentBehavior = behavior; this.cameraBehaviorSpectatorButton.Checked = behavior == Camera.Behavior.Spectator; this.cameraBehaviorFirstPersonButton.Checked = behavior == Camera.Behavior.FirstPerson; this.cameraBehaviorFlightButton.Checked = behavior == Camera.Behavior.Flight; this.cameraBehaviorOrbitButton.Checked = behavior == Camera.Behavior.Orbit; this.SetupCamera(); }
private void ChangeCameraBehavior(Camera.Behavior behavior) { if (camera.CurrentBehavior == behavior) { return; } camera.CurrentBehavior = behavior; // Position the camera behind and 30 degrees above the target. if (behavior == Camera.Behavior.Orbit) { camera.Rotate(0.0f, -30.0f, 0.0f); } }