I'm messing about with Box2d and when I suspend and then resume the application, the physics objects are re positioned on the screen in seemingly random places.
How does one go about managing Box2d objects when the application is suspended and then resumed.
Does anyone else have experience with this phenomenon?
Comments
Likes: antix
I think n1cke has a good solution as I think you can catch an event when the app is paused.
@totebo, no it always happens. My physics objects are moving down the screen and their y positions are drastically altered on resume. It might be because I am actually setting their positions instead of applying impulses and stuff. For now it doesn't matter since this is a quick project that really doesn't need actual physics. I'll be thinking about this a lot later when I make something that requires physics
Likes: antix
Likes: totebo
If you only just noticed this bug, try using an older version of Gideros. Might be a recent reversion.
Likes: antix
https://github.com/gideros/gideros
https://www.youtube.com/c/JohnBlackburn1975
Anyway I've used Bump.lua for ball/wall/block collision and some custom code for ball/paddle collision. You just can't get a decent pongy simulation with a physics engine