how to get the triangle mesh vertices apon collision

valeranth
Posts: 8
Joined: Fri Nov 14, 2008 9:54 am

how to get the triangle mesh vertices apon collision

Post by valeranth »

Hi,
I am wondering if / how it is possible to get the vertices's where a collision occurs with a triangle mesh.

The demo applicion I am working on right now loads in a obj file as several triangle meshes ( one mesh per group ), I want to add the ability to deform these meshes at acceptable speeds. The idea here is that by pressing the space bar a ball or cube will be launched at the mesh, when the object collides I receive a list of vertices's that I can then modify to make it appear at the object dented the surface.

I also later will be adding the ability to modify the texture much the same way, but that's a different subject all together.

Anyways I am just wondering how to do this.

Thanks..
valeranth
Posts: 8
Joined: Fri Nov 14, 2008 9:54 am

Re: how to get the triangle mesh vertices apon collision

Post by valeranth »

I hate to bump this but I really just need to know if this is possible and be given a ballpark of where to look.
Thanks,
mickey
Posts: 107
Joined: Fri Sep 19, 2008 6:08 pm

Re: how to get the triangle mesh vertices apon collision

Post by mickey »

Hi

You can setup callback functions that Bullet will call when a collision is registered.

Here's a wiki tutorial to it:

http://www.bulletphysics.com/mediawiki- ... d_Triggers

Cheers,

David