setCameraClip
Client-side
Server-side
Shared
Pair: getCameraClip
This function sets if the camera will "collide" with any objects or vehicles in its way. This means that if object clip is enabled an object is in the way of where the camera actually wants to be, the camera will try to be in front of it. This function can disable that.
OOP Syntax Help! I don't understand this!
- Method:Camera.setClip(...)
Syntax
bool setCameraClip ( [ bool objects = true, bool vehicles = true ] )Optional Arguments
NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use.
- objects (default: true): Sets if you want the camera to clip on objects.
- vehicles (default: true): Sets if you want the camera to clip on vehicles.
Returns
- bool: result
Always returns true.
Code Examples
client
This function enables it to look through cars.
function enableCameraThoughCars() setCameraClip(true, false) outputChatBox("Your camera can see the vehicle interior now!", 255, 0, 0, false)endaddEventHandler("onClientResourceStart", resourceRoot, enableCameraThoughCars)See Also
Camera Functions
- fadeCamera
- getCamera
- getCameraClip
- getCameraDrunkLevel
- getCameraFieldOfView
- getCameraGoggleEffect
- getCameraInterior
- getCameraMatrix
- getCameraTarget
- getCameraViewMode
- resetShakeCamera
- setCameraClip
- setCameraDrunkLevel
- setCameraFieldOfView
- setCameraGoggleEffect
- setCameraInterior
- setCameraMatrix
- setCameraTarget
- setCameraViewMode
- shakeCamera