Summary
Local coordinates do not work properly in functions.
How to reproduce
Make a behavior package that contains a function named Test
In function Test write "execute @s ~ ~1.5 ~ summon armor_stand ^ ^ ^5"
Load the behavior pack in the cheat enabled archive
Enter the game save
Change your character's orientation in the game
Run the command "/function Test" in the chat bar
Repeat Step 5 to Step 6 for multiple times
Expected Results
Armor stands are spawned 5 blocks in front of you.
Observed Results
No matter how you change the orientation, the armor stand is spawned in one place.
Note
The BDS server is not affected.
If your horizontal orientation is ry and your vertical orientation is rx, and you are currently at (x,y,z), then after executing that function, the armor stand should be spawned at this position:
( -5*cos(rx)*sin(ry)+x , -5*sin(rx)+y+1.5 , 5*cos(rx)*cos(ry)+z )
Comments 2
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.
For any account or purchasing related issues, please contact Minecraft Customer Support directly, as we cannot assist with those here at the bug tracker.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki
Resolving temporarily as Awaiting Response. Could you please add an example behavior pack to your report?
This ticket will reopen automatically when you reply.