getPlayerRotation: Get player rotation

Description Usage Arguments Value See Also Examples

View source: R/getPlayerOrientation.R

Description

Get the current rotation of a player. The default is to get the rotation for the first player spawned in the Minecraft world, but this can be run for a different player by using the player_id argument.

Usage

1
getPlayerRotation(player_id = NULL)

Arguments

player_id

Integer giving the ID of a player. You can find IDs of all current players using getPlayerIds().

Value

A numeric value between 0 and +360 indicating the direction that the player is facing, with 0 being south (positive z), 90 being west (negative x), 180 being north (negative z), 270 being east (positive x), and 360 being back at the south again.

See Also

getPlayerDirection(), getPlayerPitch(), getPlayerPos()

Examples

1
2
3
4
5
6
7
## Not run: 
getPlayerRotation()

example_playerId <- getPlayerIds()[1]
getPlayerRotation(example_playerId)

## End(Not run)

kbroman/miner documentation built on Jan. 26, 2021, 8:14 p.m.