SetNearClipPlane: Difference between revisions
From Onset Developer Wiki
Created page with "{{Info|Function|Client|1.0}} {{FuncDescription|This function culls triangles in a certain distance. Useful for the first person mode to hide head attachments.}} {{FuncSyntax..." |
No edit summary |
||
Line 3: | Line 3: | ||
{{FuncDescription|This function culls triangles in a certain distance. Useful for the first person mode to hide head attachments.}} | {{FuncDescription|This function culls triangles in a certain distance. Useful for the first person mode to hide head attachments.}} | ||
{{FuncSyntax|SetNearClipPlane()}} | {{FuncSyntax|SetNearClipPlane(radius)}} | ||
{{FuncParameters}} | {{FuncParameters}} | ||
Line 16: | Line 16: | ||
local bEnable = not IsFirstPersonCamera() | local bEnable = not IsFirstPersonCamera() | ||
EnableFirstPersonCamera(bEnable) | EnableFirstPersonCamera(bEnable) | ||
SetNearClipPlane() | SetNearClipPlane(25) | ||
end | end | ||
end | end |
Revision as of 09:52, 17 December 2019
Description
This function culls triangles in a certain distance. Useful for the first person mode to hide head attachments.
Syntax
SetNearClipPlane(radius)
Parameters
- This function has no parameters.
Return Value
- __EDIT_ME__
Example
function OnKeyPress(key)
if key == "P" then
local bEnable = not IsFirstPersonCamera()
EnableFirstPersonCamera(bEnable)
SetNearClipPlane(25)
end
end
AddEvent("OnKeyPress", OnKeyPress)