Simple physics explosion

3

Attached Files

The following files have been attached to this tutorial:

.capx

physicsexplosion.capx

Download now 179.96 KB

Stats

2,280 visits, 2,933 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 2 Mar, 2015. Last updated 19 Feb, 2019

This tutorial will show you how to make an explosion impulsion effect with physics by just using "Apply impulse at angle" and an (animated) explosion sprite.

This effect was used in some popular physics puzzle games such as Angry Birds and Cut the Rope 2.

The magic of the explosion is:

    distance(targetX, targetY, explosionX, explosionY)/threshold

The bigger the threshold, the accurate the explosion. Make it about 100-250, 100 is the recommended value.

and

    angle(explosionX, explosionY, targetX, targetY)
    

The formula in the event sheet:

.CAPX

physicsexplosion.capx

Download now 179.96 KB
  • 0 Comments

Want to leave a comment? Login or Register an account!