[r173] Physics "Disable Collisions" bug

0 favourites
  • 3 posts
From the Asset Store
Match same tiles with each other as fast as you can and earn more score during a limited time!
  • Hey Ashley, hope you are well!

    Problem Description

    So I've been compulsively checking my code to figure out why something is going a bit wrong with my physics events, but I've managed to nail down whats going wrong (Pretty severe problem in my scenario <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad"> )

    If you have a 2 physics sprites which are the floor and a box, if the box lands on the floor and you disable physics collisions, the box will not fall through. So I thought, Maybe the box is "sleeping"? So I apply a small amount of Impulse upwards to 'wake' it up, but if the impulse is small enough, the box will still collide with the floor. It seems that you need to get the box far away from the floor before it will disable collisions.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/776 ... litch.capx

    Description of Capx

    So here is what I explained above. The box is getting Impulsed upwards slightly, every 0.5 seconds. Not much to explain really except the steps to reproduce.

    Steps to Reproduce Bug

    • 1. Run the capx
    • 2. Wait for the box to land on the floor before doing anything.
    • 3. When the box is on the floor, notice that it is bumping upwards every 0.5 seconds. This is good, goes up, back down, collides with ground.
    • 4. Click "Disable Collisions", and you'll notice that nothing seems to happen, even though the object is not asleep or anything. It should be falling through the floor.
    • 5. Click "Higher Jump" and now you'll see the box fall through the floor.

    Observed Result

    Box doesn't disable collisions when called.

    Expected Result

    Box shouldn't collide with floor as soon as it is called.

    Affected Browsers

    • Chrome: (YES)

    Operating System and Service Pack

    Windows 7 64-bit

    Construct 2 Version ID

    r173, haven't got round to updating just yet but it'd be funny if this wasn't even in r174. <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz">

    Thanks for checking this out!

  • I got the same problem since r168. Maybe earlier.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Closing as won't fix. This isn't to do with Construct 2, it's something to do with the internals of Box2D's collision detection, which is not something we can easily change I'm afraid. Perhaps you can work around by destroying and recreating objects and swapping them with objects with no physics behavior?

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