Hi!
I have used Box2D in a number of projects, but now I am having trouble getting collision detection to work on the iPhone. 🙁
I am using version 2.0.1 of the engine and even the most simple collisions don't work. If I place a dynamic 1x1m box above a larger static 2x1m box, the dynamic box just takes a little pause when falling on the static one, but then continues to pass through it. I put a breakpoint in b2Contact::Create() and it does create a contact when the boxes touch, but after that something seems to go wrong.
I have done only some minor changes to the code, replaced finite() with isfinite() and renamed the "cpp" file extensions "mm" to make it compile on the iphone. If I compile the same engine code in Visual Studio and run the testbed, everything seems to work fine.
Any idea on what might be going on here?
Thanks
I have used Box2D in a number of projects, but now I am having trouble getting collision detection to work on the iPhone. 🙁
I am using version 2.0.1 of the engine and even the most simple collisions don't work. If I place a dynamic 1x1m box above a larger static 2x1m box, the dynamic box just takes a little pause when falling on the static one, but then continues to pass through it. I put a breakpoint in b2Contact::Create() and it does create a contact when the boxes touch, but after that something seems to go wrong.
I have done only some minor changes to the code, replaced finite() with isfinite() and renamed the "cpp" file extensions "mm" to make it compile on the iphone. If I compile the same engine code in Visual Studio and run the testbed, everything seems to work fine.
Any idea on what might be going on here?
Thanks