Pseudo 3D Z layer help.

0 favourites
  • 2 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • When trying to make a game that uses pseudo 3D. The closest example I can come up with is the style Don't Starve uses, just a little less 3D. My idea involves the player character being in front or behind an object depending on their Y value and the objects Y value. However, the problem I have is that only the first object created works correctly, all the others are always in front of the player.

    I need to know if I can improve my "3D" system to fix this issue. I've already tried "for each" and that's about all I can think of. Any help?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads

    Sort Z order

    Sort the Z order of instances of a given object according to an instance variable. This effectively removes all instances from their Z order, sorts them, then inserts the sorted sequence back into the holes left behind. This means if the instances are spread across a range of layers, they will be sorted in the same Z order locations, maintaining the same order relative to other instances on those layers. Note this action is much faster than using an ordered For each with an action like Send to front/back, so this action should be the preferred way to sort the Z order of large numbers of instances.

    There should be a bit more information on how to implement it if you do a forum search.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)