With this setup, near is the only thing I can think of. I got fed up with collision problems with bullets, so now I’m using a… proprietary method for the game competition. I know that doesn’t really help you, but experimentation can lead to new ways of solving problems. There is more ways to simulate a gun then just by physically adding a bullet object. Although, I have used the Near sensor for bullet collisions in the past, it allows for ghost actors, but every high-speed object in blender is going to have collision problems. Suppose your Near sensor is set to .1 unit and your bullet is moving at 5 units per frame: one frame it could be between 0 and 5 units from the object, and the same the next, so assuming your bullet is a single point, you don’t have very good odds of the bullet being within the .1 limit for any one frame. This causes problems with collision and touch sensors as well. Blender calculates the position of an object for each frame, but not where it would have been between frames. So if you are moving faster than 1 unit per frame, you have a chance of passing through a single plane, because the game engine calculates you as jumping from point to point in 3D space, rather than moving in a continuous line. As you go faster and faster, your chances of passing through a plane increase, and you can bypass larger and larger spaces, like the limit of the Near Sensor.
So… three ways to solve this:
- Slow the bullet down. That would be lame. Don’t do that.
- Increase the limit of the Near Sensor. Also lame. You could shoot next to a guy, and still register a hit.
- Make the bullet larger. I like this one. If you use dLoc to move your bullet, you know exactly how far it travels each frame. Stretch out your bullet the same distance, and now you have no gaps in its movement.
So, sorry for the long explanation and lack of a straight-forward answer, but experimenting is my advice. Try different methods, maybe invent your own, and see what works for you.