Share via


CameraSettings.SetNearAndFarPlane(Single, Single) Method

Definition

Sets the near and far plane of the camera.

public:
 void SetNearAndFarPlane(float nearPlane, float farPlane);
public void SetNearAndFarPlane (float nearPlane, float farPlane);
member this.SetNearAndFarPlane : single * single -> unit
Public Sub SetNearAndFarPlane (nearPlane As Single, farPlane As Single)

Parameters

nearPlane
Single

The distance to the near plane. Must be larger than zero.

farPlane
Single

The distance to the far plane. Must be larger than zero.

Remarks

For best quality, keep the ratio of farPlane/nearPlane low. For Augmented Reality use cases the far plane doesn't need to be very far away, 20 to 100 meters should be sufficient.

A InvalidParam error occurs, if nearPlane is greater than or equal to farPlane.

Applies to