Getting the source mesh vertices from a triangle selector
Posted: Sun Oct 25, 2009 11:24 pm
Basically, my goal is to get the three vertex indices within a mesh buffer for a triangle involved in a collision. This would allow me to directly access the mesh properties at the collision area, and do things like dynamically alter the material texture based on where the collision occurs.
I'm pretty sure I'm not the only one who might want to be able to do this, but the more I look into it, the more I suspect I may have to edit the engine source code in order to get it working right. Am I right, or am I missing something obvious? Mesh buffers don't seem to have any use for triangle3df objects, and the only solution that doesn't involve recompiling seems to be to search the mesh buffer for each triangle vertex at every collision, which seems like it would be really slow. Any suggestions?
I'm pretty sure I'm not the only one who might want to be able to do this, but the more I look into it, the more I suspect I may have to edit the engine source code in order to get it working right. Am I right, or am I missing something obvious? Mesh buffers don't seem to have any use for triangle3df objects, and the only solution that doesn't involve recompiling seems to be to search the mesh buffer for each triangle vertex at every collision, which seems like it would be really slow. Any suggestions?