Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-153513

Geometry and animation Z axis is mirrored

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.18.12 Hotfix, 1.20.60.25 Preview, 1.20.60.24 Preview, 1.20.51 Hotfix
    • None
    • Confirmed
    • Windows
    • 764295

      The bug

      In Minecraft coordinates, the positive Z direction is south. However, geometry and animations consider the positive Z direction to be north. This means all of your animations and geometry will be wrong unless you manually flip the Z axis.
      As an example, if you want an animation that makes an entity at the origin appear at coordinates (50, 50, 50), it needs to look like this:

      "position": [
         "50 * 16",
         "50 * 16",
         "-50 * 16"
      ]
      

      The Z axis must be negated because of this bug.

      This does not affect particles.

      How to reproduce

      1. Download and open the attached world
      2. Observe the blue cubes

      Expected behavior
      They should all be aligned with the blue line, just like the red and green cubes are aligned to their respective lines.

      Observed behavior
      They are on the opposite side of the blue line.

      Notes
      There are two blue cubes and two blue squares. One of the cubes is a geometry cube defined like this:

      {"origin": [-2, -2, 14], "size": [4, 4, 4], "uv": [0, 0]}
      

      The other is defined at the origin, but is animated in place like this:

      "position": [0, 0, 32]
      

      Ignore the blue squares, they are particles only relevant to MCPE-153514.

        1. GEO BUG.mcworld
          353 kB
          [Mod] tryashtar
        2. image-2022-03-30-21-27-14-559.png
          191 kB
          [Mod] tryashtar

            tryashtar [Mod] tryashtar
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              CHK: