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 |
||
(5 intermediate revisions by 3 users not shown) | |||
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(distance)}} | ||
{{FuncParameters}} | {{FuncParameters}} | ||
{{ | {{FuncParam|distance|The distance in which you have to cull the objects. Set to zero (0) to reset back to defaults.}} | ||
{{FuncReturnValue| | {{FuncReturnValue|Returns nothing.}} | ||
== Example == | == Example == | ||
Line 16: | Line 16: | ||
local bEnable = not IsFirstPersonCamera() | local bEnable = not IsFirstPersonCamera() | ||
EnableFirstPersonCamera(bEnable) | EnableFirstPersonCamera(bEnable) | ||
SetNearClipPlane() | SetNearClipPlane(15) | ||
end | end | ||
end | end | ||
Line 23: | Line 23: | ||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
*[[GetGameVersion]] | |||
*[[IsGameDevMode]] | |||
*[[IsPlayerInMainMenu]] | |||
*[[InvokeDamageFX]] | |||
*[[UpdateDiscordActivity]] | |||
*[[ConnectToServer]] | |||
*[[SetNearClipPlane]] |
Latest revision as of 11:09, 2 September 2020
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. Set to zero (0) to reset back to defaults.
Return Value
- Returns nothing.
Example
function OnKeyPress(key)
if key == "P" then
local bEnable = not IsFirstPersonCamera()
EnableFirstPersonCamera(bEnable)
SetNearClipPlane(15)
end
end
AddEvent("OnKeyPress", OnKeyPress)