Collision Physics among nodes under different markers

Mar 29, 2010 at 2: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?

Coordinator
Mar 29, 2010 at 11:23 PM

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.

Ohan

Coordinator
Mar 29, 2010 at 11:30 PM

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

Ohan

Mar 27, 2011 at 3:37 AM

Hi,

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

Coordinator
Mar 27, 2011 at 6: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.

Ohan