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