Hi, I have noticed that the contactList right now check the contacts between the bounding boxes, not the actual shapes.
so now if i have a ball near an oblique recangle, it tells me that there is a contact even if its not true.
How can i solve this problem to make sure objects are not touching before to start the simulation?
but the problem with the contactListener is that it check contacts only if use this in the update : m_world.Step(m_timeStep, m_iterations);
but if i start the steps all the objects moves.
I need a function that tells me if objects are touching each other before the update steps starts.
After it is started i dont care anymore.
Is it possible to do?
Usually not. One of the things Box2D does in the step is checking whether objects collide, and apply the appropriate forces. (That's kind of the point of a step)
Maybe you can call the contact solver separately, but I'm not that familiar with Box2D's internals.
However, I do think it's possible to call Step with a time of 0. That means that even though collisions will be found, objects will not actually move because Box2D will not simulate any time passing.
Try it. 🙂
I remember with ActionScript 2 there was the HitTest where you could use Flase or true to say thay it was using or not the bounding boxes.
In ActionScript3 they totally changed it... and that option is not avilable anymore.
Anyone of you knows how to recreate that awesome thing that as2 had?