Entity::position: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
No edit summary
Line 1: Line 1:
This property is the position of a player.
This property is the position of a player.


==Example==
==Getter==
<source lang="javascript">
* '''<span style="color:#008017">Vector3</span>'''
let playerPos = player.position
==Setter==
* '''<span style="color:#008017">Vector3</span>'''
 
== Example ==
<div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;">
<div style="margin: 10px 10px 10px 10px;"><b>Server-Side</b></div>
<syntaxhighlight lang="javascript">
const playerPos = player.position
console.log(playerPos) // return e.g. {x: 1337, y: 228, z: 70}
player.position = new Vector3(0.0, 0.0, 72.0);
player.position = new Vector3(0.0, 0.0, 72.0);
</source>
</syntaxhighlight>
</div>


==See Also==
==See Also==
{{Entity_block}}
{{Entity_block}}

Revision as of 14:29, 13 May 2017

This property is the position of a player.

Getter

  • Vector3

Setter

  • Vector3

Example

Server-Side
const playerPos = player.position
console.log(playerPos) // return e.g. {x: 1337, y: 228, z: 70}
player.position = new Vector3(0.0, 0.0, 72.0);

See Also