SetCameraClip: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
bool setCameraClip ( bool objects, bool vehicles ) | bool setCameraClip ( [ bool objects = true, bool vehicles = true ] ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== | ===Optional Arguments=== | ||
*'''objects:''' Sets if you want the camera to clip on objects. | *'''objects:''' Sets if you want the camera to clip on objects. | ||
*'''vehicles:''' Sets if you want the camera to clip on vehicles. | *'''vehicles:''' Sets if you want the camera to clip on vehicles. |
Revision as of 07:36, 27 November 2013
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.
Note: This function doesn't fix the issue of camera clip not working on objects out of world bounds.
Syntax
bool setCameraClip ( [ bool objects = true, bool vehicles = true ] )
Optional Arguments
- objects: Sets if you want the camera to clip on objects.
- vehicles: Sets if you want the camera to clip on vehicles.
Returns
Always returns true.
Example
Click to collapse [-]
ClientThis function enables it to look though cars
function enableCameraThoughCars () setCameraClip (true,false) outputChatBox ("Your camera can see the vehicle interior now!",255,0,0,false) end addEventHandler ("onClientResourceStart",getResourceRootElement(getThisResource()),enableCameraThoughCars)
See Also
- getCamera
- getCameraClip
- getCameraFieldOfView
- getCameraGoggleEffect
- getCameraViewMode
- setCameraClip
- setCameraFieldOfView
- setCameraGoggleEffect
- setCameraViewMode
- Shared
- fadeCamera
- getCameraInterior
- getCameraMatrix
- getCameraTarget
- setCameraInterior
- setCameraMatrix
- setCameraTarget