I just have a very basic system at the moment. When bullet hit enemy - subtract enemy health by 10.
And it works well for my pistol and machine gun, however, when I use a shotgun, enemies only get 10 points of damage. So, all of the pellets disappear, but only 10 damage is done. And I checked, if the pellets come one after another, like out of a pistol, they work fine, but if they all come out at once, it doesn’t work.
I just cannot figure where to even begin!
Should I space the pellets out over multiple frames? Should I try to see if I can count the number of pellets colliding with the baddy? Something with raytracing and angles?