Learn R Programming

miner (version 0.1.2)

getPlayerPitch: Get player pitch

Description

Return the player's pitch (angle in the up / down direction). 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

getPlayerPitch(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 one with a value between -90 (looking straight up) and 90 (looking straight down) giving the pitch of the player's viewpoint.

Examples

Run this code
# NOT RUN {
getPlayerPitch()

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

Run the code above in your browser using DataLab