This project is read-only.

Collision Physics among nodes under different markers

Mar 29, 2010 at 3:21 AM

I think I'm running into a scenario where physics collisions are misfiring because I have objects added to the physics engine that are underneath different markers. If I do this, I get cases where collisions are triggered where I can visually see nothing is colliding. Once I put these objects under the same marker, the problem goes away. Anyone know if this scenario is supported?

Mar 30, 2010 at 12:23 AM

The marker transformation does not affect their transformation registered in the physics engine by design, so even if you attach them to different markers, what matters in the physics engine is their transformation without marker transformation. That's why the physics engine fires collision detection. If we make the marker transformation affect the transformation in the physics engine, then it will constantly "transport" the position of the objects in the physics engine, which is not physically correct behavior. If you simply want to do collision detection attached on separate markers, then you should compute the collision yourself instead of using the physics engine.


Mar 30, 2010 at 12:30 AM

If you see Tutorial 8, you'll see how I did the collision detection correctly between two separate marker arrays using the physics engine. 


Mar 27, 2011 at 4:37 AM


Can u please explain me how to detect the collision in our own ????? pls.... Help me........

Mar 27, 2011 at 7:24 PM

You have to do triangle collision detection between the two marker's virtual representation (a quad consisting of two triangles) based on their WorldTransform. It's probably easiest if you simply check the distance between those markers and use a threshold distance to estimate whether they are touching.