Have rocket deal radius damage and force

Cheo

Active member
Hello, I'd like to be able to shoot a rocket with the rocket launcher and have objects within a given radius from the impact point lose health points and be pushed away by the blast. The Simple Damage and Add Force Actions under Impact Actions on the example rocket launcher should do the trick, but I can only manage to have a single directly hit object be affected. The demo grenade does just that though, and I don't know if that is because of the Grenade component ? If the Projectile component is capable of handling that, could someone please tell me which parameters must be changed ? I tried setting my rocket launcher's Use Context Data and Set Damage Impact Data underneath Simple Damage to true just like the demo grenade, but no avail. Thanks in advance.
 
The reason the grenade will impact multiple colliders is because of the explosion component. If you use the same component on the rocket then you'll get a similar effect. With that said, we don't have any actions that use an OverlapSphere and applies damage to everything within that sphere similar to the explosion component. It would be pretty easy for you to create an impact action that does that, though.
 
By adding the Explosion component it's possible to add some impact force on an object or enemy, but not if it's dead : for example, a crate debris or a ragdoll cannot receive anymore force impact from a blast radius, whether it be from Impact Force or Add Force. Any advice on that please ?
 
I would create a new action model that applies the force for you to all of the objects within a radius.
 
When an enemy dies its main rigidbody keeps Use Gravity to false and Is Kinematic to true, while his ragdoll colliders always have Use Gravity set to true but have Is Kinematic turned off on death. When trying to set Use Gravity to true on the root's rigidbody it starts falling through the ground. I'm not sure what but I feel like something else prevents the main rigidbody from being subject to added force once dead, what bugs me is that the character can be projected once even though he must already be dead at that point if Add Force is called after Simple Damage.
In any case the solution I found for the moment was to make an addition to Add Force - under line 192 we can add a check for the character's health and manually call Add Force for one or all rigidbodies. May I suggest you add something like that ? We should be able to play with enemies ragdoll right out of the box.

The crate debris don't make much sense to me at the moment, I only managed to move them a bit by a blast by recreating one of the pieces, it worked with both a box collider and a mesh collider.
 
Top