Trianglecollision between an object inside another!

Hi.

I want to develop a game FPS. To do this I've a complex world loaded from a blender file (breat exporter!) and some actors that can collide each other and off course with the world!!!

THIS IS THE PROBLEM!: while between actors is good a bounding box collision detail I need to now when an actor is touching a wall or the floor!

I made this surrounding the world and the actors with OBB, but suprise!: when the actor is inside the world the TriangleCollisionResult say me that it is always colliding also if I put the actor "in the air" far from the mesh of the room!!! Everyone can simply test this modifing TestOBBTree.java making a box bigger of the other, when the other box is inside collisions occurs!!!





Some idea ?

Havn't tested that, but I think collisions are reported if bounds collide regardless of the used result class (triangle or bound). But the collision results that are bounding collisions only have an empty triangle list. Does checking that list help you?

can you just modify it to test the instance of the object it is touching.

You will need to create a Wall class which extends TriMesh. In the Wall class you can define the box ( or quad ) of the wall



Then test per the following where results is youre PickResults


for(int pickIndex = 0; pickIndex < results.getNumber(); pickIndex++) {
   TriMesh mesh = (TriMesh) results.getPickData(pickIndex).getTargetMesh();
   
   if(mesh instanceof Wall) {   
   }
}