Entity::position: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
Line 8: Line 8:


== Example ==
== Example ==
<div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;">
{{ServerSide}}
<div style="margin: 10px 10px 10px 10px;"><b>Server-Side</b></div>
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
const playerPos = player.position
const playerPos = player.position
Line 15: Line 14:
player.position = new Vector3(0.0, 0.0, 72.0);
player.position = new Vector3(0.0, 0.0, 72.0);
</syntaxhighlight>
</syntaxhighlight>
</div>


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

Revision as of 14:39, 16 January 2018

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