Get Texture Name from a triangle Entity?
Posted: Tue Mar 31, 2009 7:16 pm
Hi
I've got yet another question
I'm using the default display system and load a model in the same way as the Playground sample.
Now in my game I want to play a certain sound when an object collides with a certain part of my terrain. However the sound should be assiociate with the material (texture) that it currently collides with. So if it hits a metal texture I want to play a metallic type of sound file.
I'm using the event system to figure out when a collision occurs but how do I get the texture (that is used by the default display system) from the physics triangle entity?
Any suggestions how I can achive this or is there a better solution?
I've got yet another question

I'm using the default display system and load a model in the same way as the Playground sample.
Now in my game I want to play a certain sound when an object collides with a certain part of my terrain. However the sound should be assiociate with the material (texture) that it currently collides with. So if it hits a metal texture I want to play a metallic type of sound file.
I'm using the event system to figure out when a collision occurs but how do I get the texture (that is used by the default display system) from the physics triangle entity?
Any suggestions how I can achive this or is there a better solution?