Isolating a layer for collision.

0 favourites
  • 2 posts
  • Is there a built in way to isolate a layer in terms of what objects can collide? That is to say, maybe the player picks up an item that is normally on one layer where it could collide with some things. Then the player picks it up and it's now hanging out in the players inventory, and it's been moved to the GUI layer. Now lets say part of the player inventory sorting system relies on collision/overlap detection, but you only want to pay attention to overlaps that occur on the GUI layer. In the meantime, there are other objects like the one in inventory bouncing around in other layers, but you want those ignored. Now, one further condition: all these objects are part of the same family, and the tests have to be done for the family, not the individual family members. (I'm not going to write separate scripts for each and every type of inventory item).

    I realize that some filtering can be done by checking which layer an object is on, but I am wondering specifically if there is some setting or built in method of preventing objects on one layer from colliding with objects on another. If there is, it would greatly simplify what I'm doing.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yttermayn, there's not, but using overlap detection to sort something seems a bit redundant, special reason why? if you change that, there's not really a problem, just disable collisions if family on layer

    in other case, just make two conditions, family is on hud layer and family is on object layer and put the collision in subevent

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