Best way to do bullets?

Raycasting or moving an object with hit detection? If you do raycasting, how do you make the bullet drop? How do make the ray curve? Object moving: Laggy/fills up game.

Raycasting advice is preferred, but if you really recommend moving an object you can explain how you would go around doing that.

I don’t want code. I would like an explanation like:


  1. Raycast
    Use ____ to calcuate the ____ and curve.

  2. Launch a projectile (not really doing anything, just a tracer for looks)


1 Like

I’ve never thought about this, but for temporary testing purposes I would just angle the raycast 1 or less degrees down so that over time it hits lower. I will have to look into this though.

I would recommend using objects. But you should make them physicsless and manualy change their location each frame. This should save a lot of processing power since you don’t need a full rigid body physics.

I have found this tutorial some time ago. It is extremaly complex, but not hard to do. Here you go:
Has bullet drop, and even penetration (if you hit wood, the bullet slow down).

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.