natiny.camera.set_clip
natiny.camera.set_clip(cam, near, far)
Sets the near and far planes of a camera, in world units. Nothing closer than
near or further than far is drawn, and the depth buffer spreads its
precision between them.
Parameters
| Name | Type | Description |
|---|---|---|
cam |
number |
Camera handle |
near |
number |
Distance to the near plane; must be above 0 |
far |
number |
Distance to the far plane; must be beyond near |
Example
natiny.camera.set_clip(cam, 0.2, 2000.0)
Notes
- Defaults are
0.1and100. nearis clamped to at least0.0001;faris clamped to at leastnear * 1.001.- A large
far / nearratio reduces depth-buffer precision.