Give me a logic, formulas, ways to shoot a gun

I would like you to give me a logic, formulas, ways to shoot a gun. I’m making a weapon on top of a vehicle, I already have everything, I just need the firing system.

First thing you need is a targeting system. How will you aim the weapon? Controls for the targeting, Next how will you translate the target to the 3D space? Next do you launch a projectile or do you just raycast from barrel to target position and check for a strike-able object? If you hit a strike-able target how will you apply damage?

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