void SetViewModelCamera( float viewModelFieldOfView, float viewModelZNear, float viewModelZFar )

book_4_sparkGenerated
code_blocksInput

Description

The SetViewModelCamera method configures the camera settings specifically for rendering view models. This method allows you to set the field of view, near clipping plane, and far clipping plane for the view model camera, which can be different from the main camera settings.

Usage

To use the SetViewModelCamera method, you need to provide three parameters:

  • viewModelFieldOfView: A float representing the field of view in degrees for the view model camera.
  • viewModelZNear: A float representing the near clipping plane distance for the view model camera.
  • viewModelZFar: A float representing the far clipping plane distance for the view model camera.

These parameters allow you to fine-tune how the view model is rendered, potentially differing from the main scene camera settings to achieve the desired visual effect.

Example

// Example of setting up a view model camera
SceneCamera camera = new SceneCamera();

// Set the view model camera parameters
float viewModelFOV = 60.0f; // Field of view in degrees
float viewModelZNear = 0.1f; // Near clipping plane
float viewModelZFar = 1000.0f; // Far clipping plane

camera.SetViewModelCamera(viewModelFOV, viewModelZNear, viewModelZFar);