Blender 2.6 Ray Sensor for Bullets

Hi, I have been trying to get a physical bullet working in blender for the longest time and cant get it to work unless its traveling the speed of a bowling ball. I’ve found that people suggest using a Ray Sensor for Bullets. I’ve searched through the forums and Google but cant find any tutorials or working scripts. I’m still new to python so if you have a script please post instructions on how to make it work too. Or if you have any other suggestions please let me know!
Thanks! :smiley:

I think each FPS templates uses this method. Have a look at the resource forum.

Beside that, you should tell us what you want to achieve.

You should take a look at my ray sensor video tutorial:

So, you just have to take the hit position of the ray, and use a method like applyImpulse to add a physics effect.

*Note: last time I checked, applyImpulse was acting in local space, even though the documentation states that “world coordinates” are used. I actually posted a patch for that, but I don’t know if the bge devs picked up on it.

Sorry I should have been more clear. I’ve never used an FPS template, I just always thought it would be to complicated. I’m trying to learn python but its going slow. All I’m trying to do at the moment is make a practice range and wanted the targets to fall over when I shoot them and make bullet holes when you shoot stuff and dust fly up when you hit the ground. This stuff is easy when your using a physical bullet but it doesn’t always work, like going through walls without collision detection. I’ll get an FPS template and see if I can get it to work.
After I get this down it wouldn’t be that much trouble to add people in it would it? So when I shoot them they play an animation or go to ragdoll?

Thanks I’ll take a look at this too!

You do not need to use it. Just look how it is done there. Then try to implement this or a variation in your game.

Thank you Goran! This works perfect! Great tutorial too!

How would I make a delay of the bulletholes based on distance to the object?