Description
The FieldOfView
property of the SceneCamera
class represents the horizontal field of view of the camera in degrees. This property determines how wide the camera's view is, affecting how much of the scene is visible at any given time. A larger field of view allows more of the scene to be visible, while a smaller field of view focuses on a narrower area.
Usage
To adjust the field of view of a SceneCamera
, you can set the FieldOfView
property to a desired value in degrees. This can be useful for creating different visual effects or for adjusting the camera to fit the needs of your game or application.
Example
// Create a new SceneCamera instance
SceneCamera camera = new SceneCamera();
// Set the field of view to 90 degrees
camera.FieldOfView = 90.0f;
// Access the current field of view
float currentFOV = camera.FieldOfView;
// Output the current field of view
// Note: Avoid using Console.WriteLine in Sandbox
// Instead, use in-game debugging tools or UI elements to display this information
// Debug.Log($"Current Field of View: {currentFOV}");