-
Bug
-
Resolution: Incomplete
-
None
-
1.19.51
-
None
-
Unconfirmed
-
Windows
All methods and properties related to view direction of entities in the Minecraft Bedrock Scripting API return undefined.
myEntity.viewDirection myEntity.getBlockFromViewDirection() myEntity.getEntitiesFromViewDirection()
To reproduce this issue, add the following code to a GameTest:
let simulatedPlayer = test.spawnSimulatedPlayer(new BlockLocation(0, 0, 0)); world.say(`The view direction is: ${simulatedPlayer.viewDirection}`) // undefined /* This issue does not only happen to SimulatedPlayers, but also other entities. let player = world.getAllPlayers()[0] world.say(`The view direction is: ${player.viewDirection}`) // also undefined