Best method for creating bullets

I’ve been researching this for a couple of days but can’t seem to find the best solution for my needs…

Basically I want bullets to act like seen in this video: http://www.youtube.com/watch?v=smdQE8OI2cE

It looks quite simply like the bullets are being instantiated and colliding with the objects in the scene.

However, most of the advice I’ve seen on the subject says to avoid doing that and to use raycasting. But if I used raycasting, wouldn’t I need to instantiate the bullets anyway in order to see them?

Maybe raycasting is wrong for what I’m after?

A kick in the right direction would be appreciated.

If anyone else gets curious, I’ve determined that instantiating bullets is not a bad approach for a game with bullets you can see. It’s for games like first person shooters where the bullets move at realistic speeds where raycasting is necessary.

well, i can tell you the method ive found to work best for me.

the reason you don’t want to do collision detection for bullets is because its unreliable. depending on how the bullets move, and other factors, you can end up in a situation where the bullets do not detect thier collision, and seem to just pass through what you are shooting at. this is undesirable as a game designer and as a player, because you can miss shots. to solve this you can do raycasting, but theres also downsides for that too. for one you can’t see your bullet, and another is the raycast is done instantaneously so you can’t factor in things like bullet speed and drop.

so my solution is to put a raycast on the bullet. the direction of the raycast is the velocity of the bullet, and the distance of the raycast is the distance the bullet moves per frame. if the raycast is hit, it calculates the damage. this way the bullet can still move in accordance with your games physics, you can still see it move around, and you still get the precision of raycasting.

anyway, thats what i do. i hope you find something that works for you :slight_smile: