I am working on making a shooting game. I need to do scoring of players on the basis of the place on the target where the user they hit. Since different regions need to be defined, I thought about making regions with different material. So I used different materials and named them Material1, Material2…etc. After doing this, I joined the meshes. Because of this whole target object had only one material named Material1. I can see other materials too in the Materials panel.
When I play my game and use Ray Sensor to detect only Material1, whole target object is detected. When I try to detect Material2 or 3 or 4, Nothing is detected correctly.
Can anyone help on this? Please tell me if you need further explanation.
Attached is the Picture of the Target with different materials.
Once you have joined the meshes, go into edit mode and select the faces you want to assign a different material. In the material options, select the material from the list you want to assign and press the ‘assign button’ below it (this works ONLY in edit mode).
Thanks for the reply inoodle. I have already done that. That is how I built this target object.
What I am trying to do is to click the mouse on the target and know the material hit so that i can do the scoring. For that I am using MouseOver, MouseClick and Ray Sensors. Rays sensors give me the point of impact correctly but does not give me the material hit.
Attached is the picture of target in edit mode with material 3 selected.