0 Favourites

Set Z-index

  • Hello,

    @Ashley

    currently there are only "bring to top/bottom" actions, but it's not possible to set a specific Z-index on runtime. Actually, it's a very crucial (basic) feature and it surprises me that it is missing.

  • There's a "move to object", with option to place in front or behind another item.

  • I know, but it is something different. In this case in order to set a specific Z-index, I have to remember what object it was infront of, but if the object was destroyed on runtime - it's very inconvinient this way and there are a lot of edge cases. Picking/comparing objects within one family is also problematic.

  • Yea, I agree, this would be a useful feature.

  • there should be dynamic z-indexing which i am missing.

    example - you have a house. when you character is behind the house - set the index to be behind the house, but when > 50% of Y (you get in front of the house) then set the index to be infront of the house.

    it would help with 2.5D games / isometric.

    also i hate how you have to change that all the time - example - i set that my mines for example have index 1

    and then i create a character with index 2. but if i again create a mine - she doesn't have default index 1, gets index 3 and is above both of the last objects which makes it wtf. i would recommend that you add a "default zindex" property Ashley (thnx)

  • I think the best approach would be to have a "sort Z indices by instance variable" action. I don't think dealing with Z indices themselves is very intuitive because they depend on how many objects are underneath (creating and destroying instances changes the Z index of everything above it). Then you can just have a number which does not have to be incrementing or any particular number at all, just something to sort it relative to other objects.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • I agree that there shoud be z-index option by default, and I hope c3 will include that feature, however you still can do it efficiently with events, sorted by Y axis. You can narrow it down to specyfic objects. You can make it a function that you call every time you need to z-order everything.

  • Ashley - i agree about the sorting problem because you can't determine how many objects is nested under each object and so on.. but at least give us a "default" z-index on each instance, this shouldn't be hard (i presume) to implement and it could hit next stable. thnx

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
88 9,238
goldentreee's avatar
goldentreee
Unread hot topic
56 4,727
MPPlantOfficial's avatar
MPPlantOfficial

You do not have permission to view this topic