CameraSettings.SetNearAndFarPlane(Single, Single) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.