HU/getCamera

From Multi Theft Auto: Wiki
Revision as of 13:40, 13 August 2018 by Surge (talk | contribs) (Created page with "{{Client function hu}} __NOTOC__ {{New items|3.0135|1.3.5| This function returns an element that corresponds to the game camera }} {{Note|Using attachElements with the ca...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function returns an element that corresponds to the game camera

[[{{{image}}}|link=|]] Note: Using attachElements with the camera and the main player can interfere with movement
[[{{{image}}}|link=|]] Note: Using setElementPosition/Rotation/Matrix on the camera element will automatically clear any target set with setCameraTarget

Syntax

element getCamera ()

Visszatérési érték

Returns an element that corresponds to the game camera

Példa

This example attaches (fixes) the camera to a vehicle.

local cam = getCamera()
setElementPosition( cam, 0,0,0 )  -- Clear camera target
local myVehicle = getPedOccupiedVehicle(localPlayer)
attachElements( cam, myVehicle, 0,-4,2, -20,0,0 )

Lásd még

Fordította

  • Surge