Andreas Papoutsas (wertandrew)

3 answers · asked · Lesson: Modeling Wall Sections · Course: Building Modular Game Assets

Why place origin point of pieces on the corner of the piece instead of the bottom center?

This question changes everything I believe. So when I made the first piece and a friend of mine saw it in Unity, the first question was "this is not centered?". I didn't have an answer, but I am worried since if this changes, all tiles have to have their origin moved (I am using Unity and Blender).

  • crew

    I remember thinking the technique was odd when I first learned it in college. But it has to do with snapping pieces together when building the level. With the origin in the corner, pieces will snap exactly next to each other. If the origin is in the center, the pieces will overlap when snapping.

    Though some snapping features in apps/game engines are more robust and can snap via vertices, for example, it's still a good idea to put the origin in the corner.

    • Interesting. The reason I asked was because programmers usually don't like this technique when it comes to procedural generation. Even though it makes sense not to have an offset when setting coords in procedural level generation, there is no consistency in origin points if the objects are turned, whereas if in the center, it can be the same among all objects.Unity does (barely) have a grid functionality, so typing manually the position is not needed (which would have helped if you set the origins in the corner).

    • crew

      Hey that's really interesting about procedural level generation. I didn't know about that. Thanks for the info wwertandrew!