プレイヤーの向いている方角を調べる player.getOrientation
ひとことで言うと
プレイヤーの向きを度数で返す。
ブロックとコード
プレイヤーの向いている方角
ブロックの文言は公式の日本語版に合わせています(形は簡易表示です)。
player.getOrientation()player.get_orientation()使用例
Display the player's current heading (orientation) in degrees.
JavaScript
player.onChat("playerheading", function () {
player.say("My player's orientation is: " + player.getOrientation())
})Python
def on_on_chat():
player.say("My player's orientation is: " + str(player.get_orientation()))
player.on_chat("playerheading", on_on_chat)