Triangle Collision Detection with jME Physics Engine

Hi together…



I got the following problem:



I got two objects, one dynamic node and one static node, and want to check collisions between them. As long as I use


 node.generatePhysicsGeometry();



collisions are properly detected. But when using

 node.generatePhysicsGeometry(true);



to check triangle collisions, some of them are missed. So the dynamic object moves through the static object what shouldn't happen. Any idea what could be the reason for that and how to fix it?

May be a little bit more details would be of help:



We are trying to implement a little minigolf-game with JME and JME-Physics. For testing purposes we have modelled a simple box and a ball in Blender. Collision Detection with bounding volumes works fine, but for more complex minigolf-courses (like in picture 2) we need triangle detection.

The first problem was, that the ball passed the walls. May be the problem is, that in one step the ball is in front of the wall and in the next step behind. So we increased the size of the ball and this problem didn

This looks almost like a problem i had all the time since jmephisics 1.



I created a test with jmephysics2 with a terrain and a ballthrower (like that in jmephysics 1)  some time ago and noted

some spots of the terrain still letting the ball pass through while most of the terrain bounced the ball ok.



… am going to dig it up and retest when i get to it.

I was told that ODE/OPCODE has a problem with colliding large triangles with small object. Also the triangle/triangle collision is less reliable than triangle/primitive. Try to make your ball a sphere (if you didn't already). Additionally create box collision geometries for larger flat areas while using triangle collision for smaller structures only.

If all else fails lower the simluation step size (not sure that this is possible in jME Physics 2 currently, should be added in case).