Best way to do bullets?


#1

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)
    "

ty


What is the best way to create bullet spread?
#2

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.


#3

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.


#4

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