[Scripting] getRotation() doesn't return proper entity rotation
When using the getRotation() method on a non-player entity, it doesn't return the 'visual' rotation of the entity, only the rotation while it is moving or when it stopped moving.
Steps To Reproduce:
- Setup a script to run every tick that gets one entity that uses the random_look component
- Send the getRotation() values to the console
- Observe that the rotation really only updates while the entity is pathfinding, while it looks around, the rotation values don't update (see attached video)
Expected Results:
- getRotation() [getViewDirection() also has a similar issue] returns the entities current head rotation, respecting entity components such as random_look
Observed Results:
- getRotation() only appears to return entity rotation while it is moving
Linked Issues
Created Issue:
[Scripting] getRotation() doesn't return proper entity rotation
When using the getRotation() method on a non-player entity, it doesn't return the 'visual' rotation of the entity, only the rotation while it is moving or when it stopped moving.
Steps To Reproduce:
- Setup a script to run every tick that gets one entity that uses the random_look component
- Send the getRotation() values to the console
- Observe that the rotation really only updates while the entity is pathfinding, while it looks around, the rotation values don't update (see attached video)
Expected Results:
- getRotation() [getViewDirection() also has a similar issue] returns the entities current head rotation, respecting entity components such as random_look
Observed Results:
- getRotation() only appears to return entity rotation while it is moving
Added Linked Issues:
relates to
Added Affects Versions: 1.20.41 Hotfix 1.20.50.22 Preview 1.20.50.23 Preview
Caused by MCPE-175010?
Resolving temporarily as Awaiting Response. Could you add an example add-on to your report?
This ticket will reopen automatically when you reply.