• SkaveRat@discuss.tchncs.de
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    16 hours ago

    Arbitrary and historical reasons.

    A good overview about why and who: https://ahmetburul.medium.com/coordinate-systems-of-3d-applications-guide-ddfa2194ed88

    Personally, I’m super annoyed that Z is not up. but that’s just me coming from Blender and Unreal. It makes programming 3D games more annoying, imo

    Edit to add: With Godot having its origins in 2D, Z is “into the screen”. and that orientation basically stuck. Why they used negative, I’m not sure

    • vintageballs@feddit.org
      link
      fedilink
      Deutsch
      arrow-up
      0
      ·
      15 hours ago

      I think especially in 2d, using the negative direction makes sense, as things that are “higher” should occlude things that are “lower”. It’s the same in HTML/CSS.

    • muell@lemmings.worldOP
      link
      fedilink
      arrow-up
      0
      ·
      16 hours ago

      Well, it causes moving forward to be on the negative Z-axis instead of the positive, which isn’t intuitive.

      Also, when we’re looking at the front of our model in the editor, the positive Z-axis faces away from us and the positive X-axis is on the left. Kinda backwards.

      Maybe there’s something I’m missing, but that’s the point of this thread.

      • KindaABigDyl@programming.dev
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        12 hours ago

        Not if you think of forward as “towards you.” It comes from Math. X is right, Y is up, and then when doing 3D, Z is out of the page, bc that’s easiest to draw.

      • ulterno@programming.dev
        link
        fedilink
        English
        arrow-up
        0
        ·
        15 hours ago

        I haven’t used Godot, but from the info you gave, it seems like they started as a 2D game engine.

        For something started as 3D, I would expect x and y to be on the floor and +z to be against gravity.

        • Jerkface (any/all)@lemmy.ca
          link
          fedilink
          English
          arrow-up
          0
          ·
          10 hours ago

          Well, in 2D, one would expect x and y to map to camera up/down and camera left/right in some way, depending on where we decide the origin goes on the screen. In the game world, gravity might be +/- y; it’s kind of irrelevant. In any case, z has to map to the axis the camera is looking down.

          But IIRC you can just apply a global transformation and use any coordinate system you like.