Simple physics explosion

Attached Files

The following files have been attached to this tutorial:

.capx

physicsexplosion.capx

Download now 179.96 KB

Stats

961 visits, 1,213 views

Translations

This tutorial hasn't been translated.

Tools

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

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