Description
The Rotation
property of the SceneCamera
class represents the rotation of the scene's camera. This property is used to get or set the camera's orientation in the scene, which is crucial for determining the direction the camera is facing and how it views the scene.
Usage
To use the Rotation
property, you can directly access it from an instance of SceneCamera
. You can assign a new Rotation
value to change the camera's orientation or retrieve the current rotation to understand the camera's current facing direction.
Example
// Create a new SceneCamera instance
SceneCamera camera = new SceneCamera();
// Set the camera's rotation to a new value
camera.Rotation = new Rotation(0, 90, 0); // Rotates the camera to face 90 degrees on the Y-axis
// Retrieve the current rotation of the camera
Rotation currentRotation = camera.Rotation;
// Output the current rotation
// Note: Use a logging system or UI element to display the rotation, as Console.WriteLine is not recommended
// Example: Log.Info($"Current Camera Rotation: {currentRotation}");