Description Usage Arguments Details Value See Also Examples
View source: R/getPlayerOrientation.R
Returns a unit vector describing the current direction a player is facing.
The default is to get the direction for the first player spawned in the Minecraft,
world, but the directions of other players can be gotten using the player_id
argument.
1 | getPlayerDirection(player_id = NULL)
|
player_id |
Integer giving the ID of a player. You can find IDs of all
current players using |
x is east/west with east being the positive direction. y is up/down with up being the positive direction, and z is north/south with south being the positive direction.
A numeric vector of length 3 with coordinates of the player's current direction (gaze) as a unit vector, (x,y,z).
getPlayerRotation()
, getPlayerPitch()
, getPlayerPos()
1 2 3 4 5 6 7 | ## Not run:
getPlayerDirection()
example_playerId <- getPlayerIds()[1]
getPlayerDirection(example_playerId)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.