SetNearClipPlane: Difference between revisions

From Onset Developer Wiki
28days (talk | contribs)
No edit summary
28days (talk | contribs)
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(radius)}}
{{FuncSyntax|SetNearClipPlane(distance)}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncNoParam}}
{{FuncParam|distance|The distance in which you have to cull the objects.}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|__EDIT_ME__}}

Revision as of 10:10, 17 December 2019

SetNearClipPlane

Type: Function
Context: Client
Introduced: v1.0

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(25)
	end
end
AddEvent("OnKeyPress", OnKeyPress)

See also

Template:ClientPlayerFunctions