Reputation: 34798
Background: * using Corona SDK and the physic's functions here * have tracked down an annoying problem I've had * in this game I pause physics, then later I reposition my player object & restart (start) physics again * what I see is a collision event firing that I wasn't expecting, as the player isn't near an object after I reposition it * so I'm guessing that it is the carry-over of some previous collision that occurred
QUESTION: How can I avoid getting a "buffered"/"superfluous" collision event happening here, directly after starting the physics engine???
Upvotes: 0
Views: 110
Reputation: 6296
Box2D is notorious for having problems like this... The only thing I guess you can do is store somewhere that you moved the player, and ignore the first collision and reset the flag...
Or you should delete the player and create it again.
Box2D hates when you move objects (even while paused) on your own.
Upvotes: 1