Since EasyFM proved useful for a few people, I decided to work on another plugin, using similar approach to simulate ballistics.
Now, there are a couple of bullet simulations out there already, so let me explain why another one:
First of all, it won’t be a blueprint but a plugin, which means
+no extra “clutter” in your project
+works seamlessly with both Blueprint and C++ projects
-desktop only (for now)
-if you want to do any changes to plugin itself, you have to know C++
-won’t be on the marketplace until Epic adds official plugins support
Second, i’m going to follow real world physics whenever practical. So when you hit something, it won’t output some arbitrary “damage” number, but exact amount of kinetic energy, depending on projectile mass, muzzle velocity, range etc. Projectiles will be affected by wind, gravity, and air resistance. Ricochets and wall penetration are also possible.
Third, this simulates physics and physics only, which means there will be no “out of the box” visuals, but with a bit of blueprinting you’ll be able to integrate it with weapons and effects from the marketplace (or your own).
Would it be possible to add Area of effect support for explosions from things such as Grenades, Bombs, Tank Shells, Artillery Shells, and the like? Basically things that go boom and make shrapnel in a large or small area.
I know that there are some grenades that are designed to punch through concrete then explode for example. This would also be beneficial to things such as bunker busting bombs, AP/HE Tank Shells, Artillery Shells, etc.
It would be nice to have a C++ based component that we can call in our Blueprint for interacting with other Easy Ballistics objects to determine what can be penetrated by what. For example - If I shoot a pistol with a 9mm round at the side of a Armored Tank. The pistol round should not go through the tank. Let alone penetrate it. It would be nice to have a component with an array that said X objects cannot penetrate this specific object(s). I think this would save allot of time and blue print. It would also be useful to define what behavior that bullet from that object can do. (Such as Ricochet and overall energy left after passing through an object for example)
Either way do what is best for the plugin. Just my 2 cents.
OnImpact event can be used to trigger any type of damage, be it simple hitpoint reduction, directional hit, area effect, your own custom damage type, or something completely different, like spawn shrapnel.
Yes, I’m going to do that. I just haven’t decided on exact implementation yet. I’ll probably have some kind of “material response library” that will control how different physics materials affect the behavior of the bullet. I can also make it specific for each bullet class, so you can have, for instance, tank armor being impenetrable to a 9mm bullet, but not to a 120mm shell.
At least that’s the plan, if that doesn’t work, i’ll have to come up with something else.
Material response libraries implemented as requested. Sorry it took so long.
I also implemented more accurate bullet drop. Now you can just enter mass, diameter, form factor, muzzle velocity and mach deceleration curve, and it’ll calculate the rest. From limited testing i’ve done it follows real world measured data quite nicely.
One more question:
Would you like for me to add network replication?
It will probably take quite a while to code and test it, and I might have to raise the price a bit (nothing crazy, $30 tops, less if it turns out to be easy)
…but it will work in multiplayer without you having to do anything complicated.
If that is going to be a solution that starts exactly when a projectile is spawned and handles nothing BEFORE that, I would really like that. The existing solutions while working nicely, have a lot of other systems I do not need and removing these parts is a lot of extra work. So a solution that “only handles the projectile” is something very useful for me
I have a “barrel” component that handles firing projectiles, with magazine, mixing different ammo types etc, but it’s all optional. You can safely ignore it and spawn projectiles directly.
Either via usual “spawn from class” or its own spawn function (that additionally handles submunitions, for shotguns etc).