I have a map loaded in bsp format. I want to be able to tell what specific texture I am walking on or shooting at. I can get the triangle and intersection point with a ray, but want to tell what texture it is so I can play specific sounds for different materials and display different effects for different materials.
Is this possible?
get texture from bsp map
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
I wouldn't handle it this way, I would build a custom material library to do this where you can store parameters which define which sounds should be played and which effects should be used (or maybe you could use the materialTypeParam1 and 2 provided in the SMaterial class, see http://irrlicht.sourceforge.net/docu/cl ... erial.html)
This way you can just take the surface you're standing on by doing a ray cast and read its material
This way you can just take the surface you're standing on by doing a ray cast and read its material