"IsOverlapping" not working within a parent's OnCollision event

0 favourites
  • 2 posts
From the Asset Store
Very simple code without excess options (15 events for server and 11 events for client)
  • Hi there, running into an issue where only the first one of these overlap events is firing, no matter how many of the overlaps are actually true. It's like it kicks out as soon as one condition is true, it's super strange.

    I would expect that if one of these is already overlapping at the time of collision, it would still return overlapping as true right? I am basically just trying to see which sides of a square are connected to another square but this is really confusing me

    In the screenshot I moved the square right until the circle turned green and it returned "right hit water" which is correct.

    I then moved down until colliding with the other water, and you can see that only "bottom hit water" is displayed even though the right is overlapping the water as well.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When you collide with the water, then that water instance is picked. So the events following that for overlap would only refer to the water you collided with and not other instances of water. In your events what you are asking is - when I collide with water, are these 4 points overlapping the water I collided with.

    A potential fix would be to open up all the water instances to be picked again as a sub event, so use System pick all water, then indent again and add your overlap checks for point overlaps water. This will be more in line with what you want I think - when I collide with water, are any of the 4 points overlapping with this or any other water.

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