0 Favourites

Get two colliding objects to collide *once*

  • So I have a situation where you have a little top down spaceship flying around. There's another object in the middle of the screen and when you ram it, I want it to move, but just a little bit in the direction you hit it.

    Specifically, I want you to make contact with it, push it, and then instantly turn off the collision detection. And actually the player "turns on" his own collision detection for about a second (think like a fighting game hitbox). So most of the time, your collision is OFF with the object, but if you hit it while it's on, it should push the object and instantly turn the collision OFF again.

    I think I'm doing stuff in a sort of OK way, but the problem is, it seems like the initial "collision" never ends. So what you get is like, the collision *detection* turns off, but the existing collision seems to still persist, so the player can't travel "through" the object. Here's a couple of screens.

    My events:

    Is there a way to kill existing collisions or something? Or is there some other way this can be accomplished? Thanks.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Why has the player got custom movement as well as physics behaviour?

    Why enable physics collisons at all?

    Couldn't you just use something like this? :

    player on collision with ball

    ball is iscollidable -

    apply impulse to ball

    set iscollidable to false

  • Hmm... maybe that's my problem. I'll try that, thanks.

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