# Ghost Collision Problems

Now you might think I’m retarded with the title and all, but it’s not what you think.

I made a bullet in the second layer that is a ghost. I tried some tests with boxes and when a box ghost falls through the plane it will add an object or disappear. Just what I needed. Now with the bullet, I can’t have it dynamic, so I can’t set a radius. (If it’s dynamic I can shoot at the ground and the character will go flying up.) I tried using collision, making a property named Touch on the plane, and then trying to make the bullet disappear when it touches the plane. It didn’t happen…

So, what sensor should I use for a ghost, non-dynamic, object that should disappear when it touches the plane? (Tried Near…bad results.)

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:

1. Slow the bullet down. That would be lame. Don’t do that.
2. Increase the limit of the Near Sensor. Also lame. You could shoot next to a guy, and still register a hit.
3. 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.

Huh, this is weird.

Ghost non-dynamic objects used to register collisions with things and you could use the collision sensor. Now you can’t… I don’t know if this is a bug.

One work-around… use a dynamic object, but apply a constant force upward of Mass*Gravity (if the mass is one, then it’ll probably just be 9.8 if that is your gravity). That will make the object float like a static object would.

Ugh. I tried using dynamic but most of the bullets still pass through because of their speed. I tried using a Near sensor again and made the distance 1.60 (The speed my bullet goes.) and I shot the ground. Blender crashed. T_T I’m going to try it again, but I never thought making a bullet would be so hard. D: I forget if the length of the bullet helped…I think I rejected the idea because then the bullet was way too long, but I’ll just make it longer and make some faces invisible.