GetCameraMatrix: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(New page: __NOTOC__ {{Server client function}} This function gets the position of the camera and the point it is facing. Note: The server-side version of this function returns the last camera matri...)
 
No edit summary
Line 8: Line 8:
<section name="Server" class="server" show="true">
<section name="Server" class="server" show="true">
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool getCameraMatrix ( player thePlayer )
float float float float float float getCameraMatrix ( player thePlayer )
</syntaxhighlight>
</syntaxhighlight>


Line 17: Line 17:
<section name="Client" class="client" show="true">
<section name="Client" class="client" show="true">
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool getCameraMatrix ( )
float float float float float float getCameraMatrix ( )
</syntaxhighlight>
</syntaxhighlight>


Line 25: Line 25:


===Returns===
===Returns===
Returns ''true'' if the argument are valid, ''false'' otherwise.
Returns six ''floats'' if the argument(s) are valid; the first three indicate the position of the camera, the last three indicate the position of the point it's facing. Returns ''false'' if the arguments are invalid.


==Example==
==Example==

Revision as of 05:55, 16 March 2008

This function gets the position of the camera and the point it is facing.

Note: The server-side version of this function returns the last camera matrix that was set by the server, and thus does not necessarily indicate the current matrix of the camera (since it may have been changed client-side).

Syntax

Click to collapse [-]
Server
float float float float float float getCameraMatrix ( player thePlayer )

Required Arguments

  • thePlayer: The player whose camera matrix is to be returned.
Click to collapse [-]
Client
float float float float float float getCameraMatrix ( )

Required Arguments

None.

Returns

Returns six floats if the argument(s) are valid; the first three indicate the position of the camera, the last three indicate the position of the point it's facing. Returns false if the arguments are invalid.

Example

See Also