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
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!