- Home /
How to create an explosive force with Unity2D
I know that you can use rigidbody.AddExplosiveForce when doing unity3D.
But how would you add an explosive force to Unity2D?
I need the explosive motion and the explosive rotation to be effected.
Thanks!
Answer by Dinosaurs · Aug 30, 2015 at 11:26 PM
I think what you'll need to do is to use Rigidbody2D.AddForce() and pass ForceMode2D.Impulse as the second parameter. To add rotation, you'll need to either use AddForceAtPosition and offset the force a bit, or make a second call to Rigidbody2D.AddTorque.
Im not really sure how to make addtorque act like the explosiveforce rotation.
I used AddForce with AddTorque. Finally got the explosive result i was looking for in 2D this way. Thx.
Answer by chodimirko94 · Oct 09, 2018 at 02:40 AM
I have used free asset on the asset store : https://assetstore.unity.com/packages/tools/physics/2d-explosion-force-24077
and then i found this paid asset : https://assetstore.unity.com/packages/tools/physics/explosion-force-2d-123077
I've also researched on google and the best solution for me was the paid asset. Free one works, but it's basic and simple. Paid one is well... paid. It has great features and comes with ready to use explosions.