Learn R Programming

miner (version 0.1.2)

getPlayerRotation: Get player rotation

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

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 double vector of length 1 with a value between 0 and -360 giving the angle of rotation of the player. (The value is always negative.) Values near 0/-360 indicate a player facing North (moving forward would increase position in the "x" direction.)

See Also

getPlayerDirection

Examples

Run this code
# NOT RUN {
getPlayerRotation()

example_playerId <- getPlayerIds()[1]
getPlayerRotation(example_playerId)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab