On Touched Object: does it work across objects?

0 favourites
  • 3 posts
From the Asset Store
_______ Huge collection of metal fixtures ________
  • Hi,

    Situation:

    There's a big transparent sprite called Area1.

    There's a sprite called Circle1 somewhere overlapping Area1.

    Question: Does touching Circle1 also activate what's below, i.e. the On Touched Object event of Area1?

    Right now it seems that in most cases this is indeed the case, but not always. Sometimes only the topmost object's event 'kicks in'. How is it supposed to work?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes if you touch the sprite then it will trigger the 'on touched' event. Sprite z-order/layer/visibility doesn't matter.

    Touching the sprite means touching inside it's collision polygon so if it's not working sometimes that's the first thing I would check.

  • Ok, so if I touch a sprite, all the spites below it will also receive the 'on touched' event trigger. Good.

    I've checked my polygons but they are fine. Now it seems the problem may lie elsewhere: my Area1 (as in the example) consists of a few transparent rectangular sprites because of its complicated shape.

    So maybe the Area1 event is not triggered when I accidentaly touch the small gap between the components. Will check...

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