GetCameraRotation: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(10 intermediate revisions by 6 users not shown)
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Client function}}
{{Client function}}
This function returns the local camera rotation.
{{Warning|'''This function no longer exists'''. However, below is a function that achieves a similar result.|true}}
==Syntax==
 
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
float, float, float getCameraRotation ( )
local CAM = getCamera()--The camera is always the same element, so use this local variable to save cpu power.
function getCameraRotation ()
    return getElementRotation(CAM) --rx, ry, rz
end
</syntaxhighlight>  
</syntaxhighlight>  


===Returns===
Returns three [[float]]s containing the X, Y and Z rotation values.
==Example==
This page lacks an example.
<syntaxhighlight lang="lua">
--add an example here
</syntaxhighlight>
==See Also==
==See Also==
{{Camera functions}}
{{Camera functions}}
[[Category:Needs_Example]]

Latest revision as of 21:05, 27 June 2018

Dialog-warning.png Warning: This function no longer exists. However, below is a function that achieves a similar result.
local CAM = getCamera()--The camera is always the same element, so use this local variable to save cpu power.
function getCameraRotation ()
    return getElementRotation(CAM) --rx, ry, rz
end

See Also