SetFarClipDistance: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (move note to args)
(Undo revision 69618 by DREFTHUN (talk))
Tag: Undo
 
(8 intermediate revisions by 2 users not shown)
Line 7: Line 7:
bool setFarClipDistance ( float distance )
bool setFarClipDistance ( float distance )
</syntaxhighlight>
</syntaxhighlight>
[[File:Far.png|thumb|example for function]]


===Required Arguments===  
===Required Arguments===  
*'''distance:''' A float specifying the distance of render. '''Setting this less than 5 will cause problems to the client.'''
*'''distance:''' A float specifying the distance of render. '''Setting this less than 5 will cause problems to the client.'''
===Returns===
===Returns===
Returns ''true'' if the distance was set correctly, ''false'' if invalid arguments were passed.
Returns ''true'' if the distance was set correctly, ''false'' if invalid arguments were passed.


==Example==
==Example==

Latest revision as of 20:08, 15 March 2021

This function is used to set the distance of render. Areas beyond the specified distance will not be rendered.

Syntax

bool setFarClipDistance ( float distance )
example for function

Required Arguments

  • distance: A float specifying the distance of render. Setting this less than 5 will cause problems to the client.

Returns

Returns true if the distance was set correctly, false if invalid arguments were passed.








Example

Click to collapse [-]
Server

This example adjusts the visibility range of the game world.

addEventHandler( "onResourceStart", resourceRoot,
	function( )
		setFarClipDistance( 3000 ) -- We adjust visibility range to 3000 metres
	end
)
Click to expand [+]
Client

See Also