I agree that on my picture there is no collision - it was more to show a generic case. But even when I fly trough the object representing the water, I do not get a collision.
I have tried your suggestion. I changed the collision detection method to:
public float checkCollision(SimpleVector sv)
{
sv = sv.normalize();
final float minDist = ground.calcMinDistance(ground.getTransformedCenter(), sv);
if(!(minDist == Object3D.COLLISION_NONE))
{
Log.e("Collision", Float.toString(minDist));
}
return null;
}
Collision is almost never triggered when I fly trough the plane, but is sometimes randomely triggered for some minDist figures around 50.
I strongly suspect that I am doing something wrong, perhaps with the coordinates system, but could not find anything obvious. I have even changed the translation vector sv to always point straight up towards the plane.
Would you mind if I sent you my two models? Without textures, but they should still load properly. I load them via the code pasted a few messages above. For the plane, I do not set any collision attributes. For the ground, I set
ground.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);
ground.setCollisionOptimization(Object3D.COLLISION_DETECTION_OPTIMIZED);
Many thanks
Nicolas