I've got a situation where I want to switch an object's physics between movable & immovable, however there's a problem with this as you can see in the capx. Click on the red sprite to toggle, & the sprite falls through the floor when it becomes movable (this gets worse with each click).
I've tried moving the sprite up 1 pixel before it's set to movable again to avoid overlaps, but that doesn't work. It seems to have no collision with the floor for a few frames. Any ideas for a workaround?