About Store Forum Documentation Contact



Post Reply 
Any way to get hitted material?
Author Message
krokodilcapa Offline
Member

Post: #1
Any way to get hitted material?
Hi guys!

Is there any way to get the hitted material of a mesh? I mean something like when you get the hitted physics shape with rays...
(This post was last modified: 06-16-2012 08:14 PM by krokodilcapa.)
06-16-2012 08:14 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Any way to get hitted material?
if you want the world heightmap material then there are functions to obtain its material on given world position, called 'hmMaterial'.
for other objects, you need to detect its C++ class and do the check codes manually depending on the class.
06-18-2012 06:26 PM
Find all posts by this user Quote this message in a reply
Tottel Offline
Member

Post: #3
RE: Any way to get hitted material?
06-18-2012 06:34 PM
Find all posts by this user Quote this message in a reply
krokodilcapa Offline
Member

Post: #4
RE: Any way to get hitted material?
First, thanks for the answers!
Esenthel: I mean for multimaterial objects, so I guess I need the get the hitted submesh's material. Its for bullet decals, so if I had a shovel for example, I want to create different decals on the iron part, and on the wood part. I worked with neoaxis engine before Esenthel, and I did this by physics shapes(I created shapes to every submesh, and named them like wood/metal etc.. so I've got the hitted shape by a ray from bullet, and then I created different particles and etc..., but it should be better to get the subpart of mesh and its material)
Tottel: Thanks for the link! It will be very useful for my project! smile
06-18-2012 08:27 PM
Find all posts by this user Quote this message in a reply
Post Reply