ProjectileMovement Vs Raycasts for Bullet Drop, Penetration, Ricochet

OK, you are wrong. Bullets don’t EVER travel in straight lines. Laser guns might though, if they existed. Lasers definitely do travel a straight line, and at the time of light.

  1. use math instead? it’s probably faster to boot. You have a start point, you have gravity. you can estimate the speed. the rest is math.

  2. what? why would you add more hits? that’s confusing. do you mean continuing on after the first hit? sort of the same as 3.

  3. that’s already an option with ray tracing, basically you can detect the Normal of the item you hit, and decide via math at what angle the bullet should ricochet. there’s precise formulas for this depending obviously on velocity, spin, composition of the bullet (FMJ, vs led) hardness of the material, etc.

Don’t even mention “Somewhat realistic” if you aren’t using projectiles of some sort (you could make your own component with your own mathematical formulas). And USUALLY, projectiles don’t impact performance for their lifespan is too short to do so. (normally you remove them after impact or shortly after in the case of a ricochet Any decent tutorial will show you how to get them to destroy, any tutorial that doesn’t should be automatically not watched).
In other words, unless you have 100 players all contemporaneously shooting into a badly made MMO you have no chance of getting hundreds of projectiles lingering around long enough to cause performance issues, even with way more intense calculations happening then the projectile component calls for, and crazy Cascade/Niagara particle effects within the projectile…