getNearClipDistance | Multi Theft Auto: Wiki Skip to content

getNearClipDistance

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function gets the distance from the camera at which the world starts rendering. For more information about this please refer to setNearClipDistance.

Syntax

getNearClipDistance ( )

Code Examples

client

This example adds a/testmynearclipdistancecommand which outputs different things deppending of the current near clip distance.

local function tellPlayerNearClipFacts()
local nearClipDistance = getNearClipDistance()
outputChatBox(nearClipDistance == 0.3 and "Your near clip distance is normal." or (nearClipDistance > 0.3 and "Be aware! You shouldn't be able to see very near objects so well!" or "You should be able to see very near objects so well!"))
end
addCommandHandler("testmynearclipdistance", tellPlayerNearClipFacts)

See Also

World Functions