mojira.dev
MCPE-165527

Bedrock Scripting API "viewDirection" related methods not working

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

Comments 2

Resolving temporarily asΒ Awaiting Response. Is this still an issue in the latest version of the game (1.20.1)?
This ticket will reopen automatically when you reply.

Cleaning up old tickets: This ticket had been set to 'Awaiting Response', but has not received a response from the reporter (~3 months+) so is being closed as Incomplete. If you feel this is still a valid issue then please comment, or create a new ticket following the Issue Guidelines which includes steps to reproduce the problem.

Quick Links:
πŸ““ Issue Guidelines – πŸ’¬ Mojang Support – πŸ“§ Suggestions – πŸ“– Minecraft Wiki

Aviv Keller

(Unassigned)

Unconfirmed

Windows

Windows 11

1.19.51

Retrieved