GetCameraRotation: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(14 intermediate revisions by 9 users not shown)
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Client function}}
{{Warning|'''This function no longer exists'''. However, below is a function that achieves a similar result.|true}}


[[Category:Depreciated]]
'''OBSOLETED!'''
This function returns the rotation the specified player's camera would have if it's fixed (see [[setCameraMode]]).
==Syntax==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
float float float getCameraRotation ( player thePlayer )
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>  
===Required Arguments===
*'''thePlayer:''' The player whose camera rotation you wish to obtain.
===Returns===
Returns three [[float|floats]] containing the x, y and z rotation values if the function was successful, ''false'' otherwise.
==Example==


==See Also==
==See Also==
{{Camera functions}}
{{Camera functions}}
[[Category:Incomplete]]

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