Author
|
Message
|
Member
|
10-03-2015
, 03:20
Help with a fragmentation grenade
|
#1
|
I'm working on a mod for Insurgency that tweaks the grenades, I want to add a fragmentation effect that can hit people with fragments further than the explosion radius reaches. The way I think I'd like to implement it is to basically fire a number of "bullets" to act as fragments from the grenade in random directions. I'd like it to be a little smart so if the grenade is on a floor, it shoots a majority of the fragments up and out rather than into the ground, if for no other reason than shrinking the number of fragments I'm creating.
The distance from the grenade to the target will determine the amount of damage taken by the fragment, for example 100 at 1 meter and 20 at 10 meters. Ideally, I'd like to shoot 20-30 fragments, so I'm hoping this won't be too computationally intensive. I don't really have a preference as to using missiles and tiny fragment models or just using tracerays, my guess is traces will be less obnoxious than having to send a bunch of entity data.
I have been searching for a couple hours and didn't find anything like this, I'd appreciate a pointer at something I can use as a baseline if I'm just missing it. If not, I'd welcome any suggestions for the best ways to implement this, I can probably muddle through and get something working but I think this needs someone a little more experienced than me to implement properly.
Thanks for reading!
|
|
|
|