GetCameraPosition: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 4: Line 4:


This function returns the position the player's camera would have if the camera mode is fixed (see [[setCameraMode]]).
This function returns the position the player's camera would have if the camera mode is fixed (see [[setCameraMode]]).
==Syntax==  
==Syntax==
===Procedural===  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
float float float getCameraPosition ( )
float float float getCameraPosition ( )
</syntaxhighlight>  
</syntaxhighlight>  
===OOP===
<syntaxhighlight lang="lua">
Vector3 Camera.getPosition ( )


===Returns===
==Return==
===Procedural===
Returns three [[float|floats]] containing the x, y and z coordinates if the function was successful, ''false'' otherwise.
Returns three [[float|floats]] containing the x, y and z coordinates if the function was successful, ''false'' otherwise.
===OOP===
Returns a vector with the coordinates if the function was successful, an empty vector otherwise.


==Example==  
==Example==  

Revision as of 22:29, 9 December 2013

Template:DeprecatedWithAlt

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

Syntax

Procedural

float float float getCameraPosition ( )

OOP

Vector3 Camera.getPosition ( )

==Return==
===Procedural===
Returns three [[float|floats]] containing the x, y and z coordinates if the function was successful, ''false'' otherwise.
===OOP===
Returns a vector with the coordinates if the function was successful, an empty vector otherwise.

==Example== 
This page lacks an example.
<syntaxhighlight lang="lua">
--Add an example here

See Also