Explosion with physics

  • I wonder how to make rocket effect after hitting a wall of bricks. After the explosion, every brick flew through the air in a realistic manner.

    (if i working on platform game)

  • Haven't messed around with the physics in C2 much. But I know in CC,you could check at the point of explosion the distance and angle of each block from it, and then apply force in the opposite direction in comparison to how close the block was and that would get a decent looking result.

  • Well you can also just destroy the brick sprite and spawn some particles. Nobody will check if your "flew through the air" physics is mathematically right (:

  • This too is an option but I want to brick fell to the ground

  • just spawn some physics "particles", but you groundobjects wil need to be physic enabled too, or you could just give the particles an impulse when hitting something, so they appear to bounce of floor, wall,

    but this effect can be made with normal particles too, with some more work

    ow you want the bricks itself fall, then yes, add physics to the bricks and do an impulse on the bricks,

  • i try with impulse but particles fly away only with X and Y direction, even if explosion is between two walls, I want to create effect which explosion throw away around bricks naturally

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • hmm yes, you need to calculate the impact/explosion direction relative to the bricks,

    lets say you have an explosion sprite, then you would create a angle test on all bricks relative to the explosion sprite

    something like this

    for each brick

    brick.impactangle =

    angle(explosion.x,explosion.y,brick.x,brick.y)

    impulse at angle = brick.impactangle -180

    for strength you can also do a distance check from explosion

  • any ideas how do it? :)

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