Finding a texture name on collision
by Sam Mason · in Torque Game Engine · 04/23/2007 (9:06 pm) · 4 replies
Quick question: is there any way of the engine returning the name of a texture applied to a dif interior where a projectile has collided with it?
Any ideas would be greatly appreciated,
Regards,
Sam.
Any ideas would be greatly appreciated,
Regards,
Sam.
#2
04/24/2007 (7:53 pm)
I'm guessing you want particle effects based on material type. No method exists in default Torque code, you have to code that in yourself.
#3
04/24/2007 (7:58 pm)
Cheers guys, thanks for your help, I suspected as much. I'm guessing I would probably have to add some code to the Interior class in the engine to return the texture map name at a given polygon face/normal. oh well I'll just have to break my interiors into separate objects in the world editor and return the object name.
#4
It is possible though, I did it in my last game to find out what texture was under the vehicle using a castray.
Try this resource It wont solve your problem but will show you where to start.
04/28/2007 (8:00 pm)
The problem you will encounter is that the materials are not loaded on the server and you will need to make a code change to allow that. (let the server store the material name, NOT load the material)It is possible though, I did it in my last game to find out what texture was under the vehicle using a castray.
Try this resource It wont solve your problem but will show you where to start.
Torque 3D Owner mb