From Multi Theft Auto: Wiki

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


float getNearClipDistance ( )


This function returns a float containing the actual near clip distance.


This example adds a /testmynearclipdistance command 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!"))
addCommandHandler("testmynearclipdistance", tellPlayerNearClipFacts)

See also