Check if a specific sprite is visually obstructed on the point where it's being clicked?

From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • I have the following use case:

    • Lots of different object types are on-screen (e.g. sprites, 9-patch etc.) and moving around.
    • These moving objects will be randomly changing in z-depth.
    • Changing these object types in order to achieve a solution is not a possibility.
    • The objects and object types are many, meaning that adding them to families in order to run any checks would be cumbersome (but possible if it's the only viable solution).
    • I need to check if true, only when the player clicks on a specific sprite (i.e. I only need to run the check for this specific object) when it's not obstructed by another object.

    Or to put it in more simple terms:

    How can I check when a specific sprite object is not visually obstructed by any other visible object, at the exact point where the player is clicking on it?

  • Obstructed meaning what?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I can think of only one way - add all such objects to families, then use "System Pick overlapping point" for each family, pick top instance, compare z-index with z-index of the sprite.

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