GetScreenFromWorldPosition: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{Client function}}
This function gets the screen position of a point in the world. This is useful for attaching 2D gui elements to parts of the world (e.g. players) or detecting if a point is on the screen (though it does not check if it is actually visible, you should use [[processLineOfSight]] for that).
 
==Syntax==
==Syntax==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
float float getScreenFromWorldPosition ( float x, float y, float z )
float float getScreenFromWorldPosition ( float x, float y, float z )
</syntaxhighlight>
</syntaxhighlight>
{{Client function}}

Revision as of 01:25, 13 November 2007

This function gets the screen position of a point in the world. This is useful for attaching 2D gui elements to parts of the world (e.g. players) or detecting if a point is on the screen (though it does not check if it is actually visible, you should use processLineOfSight for that).

Syntax

float float getScreenFromWorldPosition ( float x, float y, float z )