GetCamera: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 12: | Line 12: | ||
===Returns=== | ===Returns=== | ||
Returns an [[element]] that corresponds to the game camera | |||
==Example== | ==Example== |
Revision as of 20:31, 23 August 2014
This function returns an element that corresponds to the game camera
Note: Using attachElements with the camera and the main player can interfere with movement |
Note: Using setElementPosition/Rotation/Matrix on the camera element will automatically clear any target set with setCameraTarget |
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
- fadeCamera
- getCamera
- getCameraClip
- getCameraFieldOfView
- getCameraGoggleEffect
- getCameraInterior
- getCameraMatrix
- getCameraTarget
- getCameraViewMode
- setCameraClip
- setCameraFieldOfView
- setCameraGoggleEffect
- setCameraInterior
- setCameraMatrix
- setCameraTarget
- setCameraViewMode