The Camera
property of the ScenePanel
class specifies the SceneCamera
instance that will be used to render the scene onto the panel. This property is essential for defining the perspective and view settings of the scene being rendered.
The Camera
property of the ScenePanel
class specifies the SceneCamera
instance that will be used to render the scene onto the panel. This property is essential for defining the perspective and view settings of the scene being rendered.
To use the Camera
property, you need to assign a SceneCamera
object to it. This camera will then be responsible for rendering the scene within the ScenePanel
. Ensure that the camera is properly configured with the desired settings such as position, rotation, and field of view to achieve the intended visual output.
// Example of setting up a ScenePanel with a custom camera var scenePanel = new ScenePanel(); var customCamera = new SceneCamera(); // Configure the camera customCamera.Position = new Vector3(0, 0, 10); customCamera.Rotation = Rotation.From(0, 180, 0); // Assign the camera to the ScenePanel scenePanel.Camera = customCamera; // Optionally, configure other properties of the ScenePanel scenePanel.RenderOnce = true;