GetCamera: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 15: | Line 15: | ||
==Example== | ==Example== | ||
This example attaches the camera to a vehicle | This example attaches (fixes) the camera to a vehicle | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
cam = getCamera() | cam = getCamera() | ||
setElementPosition( cam, 0,0,0 ) -- Clear camera target | |||
myVehicle = getPedOccupiedVehicle(localPlayer) | myVehicle = getPedOccupiedVehicle(localPlayer) | ||
attachElements( cam, myVehicle, 0,-4,2, -20,0,0 ) | attachElements( cam, myVehicle, 0,-4,2, -20,0,0 ) |
Revision as of 08:04, 20 February 2014
Syntax
element getCamera ()
Returns
- Returns an element that corresponds to the game camera
Example
This example attaches (fixes) the camera to a vehicle
cam = getCamera() setElementPosition( cam, 0,0,0 ) -- Clear camera target myVehicle = getPedOccupiedVehicle(localPlayer) attachElements( cam, myVehicle, 0,-4,2, -20,0,0 )
See Also
- getCamera
- getCameraClip
- getCameraFieldOfView
- getCameraGoggleEffect
- getCameraViewMode
- setCameraClip
- setCameraFieldOfView
- setCameraGoggleEffect
- setCameraViewMode
- Shared
- fadeCamera
- getCameraInterior
- getCameraMatrix
- getCameraTarget
- setCameraInterior
- setCameraMatrix
- setCameraTarget