GetCameraPosition: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
m (Changed "DeprecatedWithAlt" template to "Deprecated")
 
(31 intermediate revisions by 12 users not shown)
Line 1: Line 1:
__NOTOC__  
__NOTOC__
This function returns a [[string]] containing the current mode of the specified player's camera.
{{Server client function}}
==Syntax==  
{{Deprecated|getCameraMatrix|}}
 
This function returns the position that the player's camera would have if the camera mode was fixed (see [[setCameraMode]]).
 
==Procedural==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
string getCameraMode ( player thePlayer )
float float float getCameraPosition ()
</syntaxhighlight>  
</syntaxhighlight>


===Required Arguments===
This function returns the X, Y and Z coordinates as three [[float|floats]] if the function was successful, ''false'' otherwise.
*'''thePlayer:''' The player whose camera mode you wish to obtain.


===Returns===
===Example===
Returns a string with one of two values if successful:
This page lacks an example.
* '''player:''' The camera is attached to a player or object.
* '''fixed:''' The camera is in a fixed position.


The function will return ''false'' if unsuccessful.
{{New items|3.0140|1.4|
==Object-oriented==
<syntaxhighlight lang="lua">
Vector3 Camera.getPosition ()
</syntaxhighlight>


==Example==
This function returns a vector with the coordinates if the function was successful, an empty vector otherwise.


===Example===
This page lacks an example.
}}
==See Also==
==See Also==
{{Camera functions}}
{{Camera functions}}
[[Category:Incomplete]]
{{Needs_Checking|Is the description correct?}}

Latest revision as of 16:24, 13 February 2015

Emblem-important.png This function is deprecated. This means that its use is discouraged and that it might not exist in future versions.

Please use getCameraMatrix instead.


This function returns the position that the player's camera would have if the camera mode was fixed (see setCameraMode).

Procedural

float float float getCameraPosition ()

This function returns the X, Y and Z coordinates as three floats if the function was successful, false otherwise.

Example

This page lacks an example.

Object-oriented

Vector3 Camera.getPosition ()

This function returns a vector with the coordinates if the function was successful, an empty vector otherwise.

Example

This page lacks an example.

See Also