0 Favourites

Physics Explosion

  • How would you do a physics explosion...

    Say you place a bomb on an object and you want to apply force in a 360 degree angle. How would you do that...?

    Am i right in thinking i'd need to create invisable objects say 8 of them to cover the minimum angles, then create the objects at time of explosion, giving each one a force in a certain direction, then create an impulse force for the objects they hit..?

    Ha i think i may have answered my own question...

    It would be nice to have that as an option in the physics already... would save alot of time, Explosion Force with variables to cover power and distance...

    One other thing is if 3 objects have physics and they are on different layers how come they still interact..? i was trying to use drag n drop to place a bomb on an object, but it keeps moving the object i place it on. I know i can remove the physics on the bomb and it stops the interaction... but i just wondered.

  • -On Collision between Explosion and Object

    = Apply force 1000 to Object in opposite direction of Explosion

    If construct 2 doesn't have "in opposite direction of" then it needs it I say. otherwise do:

    -On Collision between Explosion and Object

    = Apply force 1000 to Object in direction of Explosion.Angle/Object.Angle*360

    / = devide   * = times

    If not try:

    -On Collision between Explosion and Object

    = Apply force 1000 to Object in direction of Explosion.Angle/Object.Angle+270

    It's something along those lines of math!

    Just thought:

    -On Collision between Explosion and Object

    = Object look towards Explosion

    = Apply force 1000 to Object in direction of Object.Angle+180

    It's really similar to one of those, I'll make an example tomorrow!

  • One other thing is if 3 objects have physics and they are on different layers how come they still interact..?

    This is answered in the physics basics tutorial

    ote: Physics objects only interact with other physics objects.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • I have completed the example, took 5 minutes to work out (I'll include a picture and file below)! :D

    RedBlock = Explosion

    BlueBlock = Boxes

    GreenBlock = Walls

    -BlueBlock on collision with RedBlock

    = BlueBlock : Apply Physics Impulse 100 toward RedBlock.X, RedBlock.Y

    <img src="http://screensnapr.com/e/GL5F3g.png" border="0">

    Click here to Download the Source File

    It makes sense that impulse is basically (move away from another object) which is an explosion, so as soon as I saw the impulsion option I knew :) Have fun blowing up some blocks Tonycrew

  • Hi all,

    I am new in Construct 2<img src="smileys/smiley1.gif" border="0" align="middle">,

    I changed events of dcrew project to remove the redblock and check the distance between mouse and blueblock, and adapt the force of the explosion with the distance between the mouse and the blueblocks.

    http://dl.dropbox.com/u/10596159/Physics%20Impulsion%20%28Explosion%29.capx

  • Nice effect zapoutix.

    Thanks for sharing

  • Question! Physic and other movement types can't mix?

    I've created monster that chase after me, but the Physic expulsion just don't work on monster that are moving.

    For the monster movement, i've tried "Move forward X pixels" "bullet movement", they both don't work...

  • Nice example. I need to do the same thing using platform.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)