GetCameraPosition: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 5: Line 5:
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>
===OOP===
<syntaxhighlight lang="lua">
Vector3 Camera.getPosition ( )
Vector3 Camera.getPosition ( )
</syntaxhighlight>
</syntaxhighlight>

Revision as of 19:05, 10 December 2013

Template:DeprecatedWithAlt

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

Syntax

float float float getCameraPosition ( )
Vector3 Camera.getPosition ( )

Return

  • Procedural: Returns three 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.

See Also