Search code examples
iphoneobjective-cbox2dsensorsfixture

Box2d sensor rotation problem


in my app the user is able to move or rotate a box2d fixture. The collision detection works fine. But if I set the fixture as a sensor, with the SetSensor(true) method, the collision detection reacts weird. In the following picture the red rectangle is the sensor, but a collision is also detected if an other fixture collides with the black border.

Image: http://img851.imageshack.us/img851/7292/rect.png

Is it possible that only the red rectangle reacts as a sensor?

BR


Solution

  • I found the help here: Box2D Forum

    I just forgot to check if the contact is touching (with the IsTouching() method)! Now it works fine!!!