get texture from bsp map

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
grunt
Posts: 96
Joined: Tue Aug 17, 2004 9:14 pm
Contact:

get texture from bsp map

Post by grunt »

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?
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

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
Post Reply