SetFarClipDistance: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 17: | Line 17: | ||
==Example== | ==Example== | ||
<section name="Server" class="server" show="true"> | <section name="Server" class="server" show="true"> | ||
This example adjusts the visibility range of the game world. | |||
<syntaxhighlight lang="lua">addEventHandler("onResourceStart",resourceRoot,function() | <syntaxhighlight lang="lua"> | ||
addEventHandler( "onResourceStart", resourceRoot, | |||
end) | function() | ||
setFarClipDistance( 3000 ) -- We adjust visibility range to 3000 metres | |||
end | |||
) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | </section> | ||
<section name="Client" class="client" show="false"> | <section name="Client" class="client" show="false"> | ||
This example adjusts the visibility range of the game world. | |||
<syntaxhighlight lang="lua">addEventHandler("onClientResourceStart",resourceRoot,function() | <syntaxhighlight lang="lua"> | ||
addEventHandler( "onClientResourceStart", resourceRoot, | |||
end) | function( ) | ||
setFarClipDistance( 3000 ) -- We adjust visibility range to 3000 metres | |||
end | |||
) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | </section> |
Revision as of 13:19, 3 August 2014
This template is no longer in use as it results in poor readability.
This function is used to set the distance of render. Areas beyond the specified distance will not be rendered.
Syntax
bool setFarClipDistance ( float distance )
Required Arguments
- distance: A float specifying the distance of render.
Returns
Returns true if the distance was set correctly, false if invalid arguments were passed.
Example
Click to collapse [-]
ServerThis 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 [+]
ClientSee Also
- areTrafficLightsLocked
- getAircraftMaxHeight
- getAircraftMaxVelocity
- getCloudsEnabled
- getFarClipDistance
- getFogDistance
- getGameSpeed
- getGravity
- getHeatHaze
- getInteriorSoundsEnabled
- getJetpackMaxHeight
- getMinuteDuration
- getMoonSize
- getOcclusionsEnabled
- getRainLevel
- getSunColor
- getSunSize
- getTime
- getTrafficLightState
- getWeather
- getWindVelocity
- getSkyGradient
- getPlayerBlurLevel
- getZoneName
- isGarageOpen
- removeWorldModel
- resetFarClipDistance
- resetFogDistance
- resetHeatHaze
- resetMoonSize
- resetRainLevel
- resetSkyGradient
- resetSunColor
- resetSunSize
- resetWindVelocity
- restoreAllWorldModels
- restoreWorldModel
- setAircraftMaxHeight
- setAircraftMaxVelocity
- setCloudsEnabled
- setFarClipDistance
- setFogDistance
- setGameSpeed
- setGarageOpen
- setGravity
- setHeatHaze
- setInteriorSoundsEnabled
- setMinuteDuration
- setMoonSize
- setOcclusionsEnabled
- setRainLevel
- setSkyGradient
- setSunColor
- setSunSize
- setTime
- setTrafficLightState
- setTrafficLightsLocked
- setWeather
- setWeatherBlended
- setWindVelocity
- setJetpackMaxHeight
- setPlayerBlurLevel