Entity::position: Difference between revisions
CocaColaBear (talk | contribs) 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== | ||
< | * '''<span style="color:#008017">Vector3</span>''' | ||
==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); | ||
</ | </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);