Mojira Archive
MCPE-160213

Local coordinates do not work properly in functions

Summary

Local coordinates do not work properly in functions.

How to reproduce

  1. Make a behavior package that contains a function named Test
  2. In function Test write "execute @s ~ ~1.5 ~ summon armor_stand ^ ^ ^5"
  3. Load the behavior pack in the cheat enabled archive
  4. Enter the game save
  5. Change your character's orientation in the game
  6. Run the command "/function Test" in the chat bar
  7. 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 )

Incomplete

Happy2018new

2022-08-04, 05:15 AM

2023-01-20, 05:48 PM

2023-01-20, 05:48 PM

0

1

Plausible

1.19.20.24 Preview, 1.19.11 Hotfix

-