achieve invert polygon collision?

0 favourites
  • 5 posts
  • Hello all,

    I'm trying to create a racing game in which you die if you go out of track. if I put collision points on the track, it will work if I'm outside the sprite and try to enter it.

    How can I achieve the opposite? I'm inside the sprite and shoot an event if I'm trying to exit it?


  • Right click on the overlap event and select 'Invert', this then becomes 'when not overlapping the sprite' i.e. when you are outside of the sprite area or track. This would be more for if the entire car has to be off the track though. You could also consider just having a sprite that borders the outside of the track and using an overlap event with this if it is to be that the car is slightly off track that triggers the lose event.

  • Thanks , but I'm looking for a way to fire touching the edges rather than completely exiting a sprite. I was thinking about creating a polygon that start from the edges of the sprite and shaping up towards the border but this causes a lot of unnecessary collision points so I'm looking for a more optimized way.

  • Hmm well there's the second way I mentioned where you collide with the outside of the track. You could also possibly do something like set image points on each corner of the vehicle and say if any one of these is not overlapping the sprite then the vehicle is outside of the track.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • um.. How do I check collision against image points? couldn't see it in the sprite events...

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