Selecting and deleting triangles

Hi,

I’d like to know how to select (and then remove) single polygons from a mesh.
For instance, I’ve a sort of checker-board model, I set up the collisions and I would like to select a single triangle of the model geometry with the mouse and then delete it.
I set up the collision with the mesh but since it is made of a single GeomNode I always have the same CollisionEntry.

I know that when calling showCollisions() on a CollisionTraverser I can see the single triangles that are colliding but from a quick look at the C++ code I didn’t understand how I could get a pointer to these highlighted triangles.

I wonder also if the same mechanism could work with quads instead of triangles.

Anybody knows ?

Also see this post: discourse.panda3d.org/viewtopic.php?t=2680

So, no, it’s not possible, you’d need to loop through the triangles yourself and compare the positions to get the right triangle.

I see, thanks for the quick reply.

I guess I’ll try as you suggested, looping through the triangles and comparing the positions to find the right one.