SetNearClipPlane: Difference between revisions
From Onset Developer Wiki
No edit summary |
No edit summary |
||
Line 16: | Line 16: | ||
local bEnable = not IsFirstPersonCamera() | local bEnable = not IsFirstPersonCamera() | ||
EnableFirstPersonCamera(bEnable) | EnableFirstPersonCamera(bEnable) | ||
SetNearClipPlane( | SetNearClipPlane(15) | ||
end | end | ||
end | end |
Revision as of 20:26, 19 December 2019
Description
This function culls triangles in a certain distance. Useful for the first person mode to hide head attachments.
Syntax
SetNearClipPlane(distance)
Parameters
- distance
The distance in which you have to cull the objects.
Return Value
- __EDIT_ME__
Example
function OnKeyPress(key)
if key == "P" then
local bEnable = not IsFirstPersonCamera()
EnableFirstPersonCamera(bEnable)
SetNearClipPlane(15)
end
end
AddEvent("OnKeyPress", OnKeyPress)