How do I make physics push objects away from a certain point

  • I have a missile, and after 500 pixels I want it to destroy and explode and push everything around it out from the center (the missile) of the blast.

    I talked with my teacher about it, and he suggested a couple of ways, but all of which were difficult. Is there an "easy" way to do this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • set the movement angle of all objects around the blast to angle(missile.x,missile.y,object.x,object.y)

    so when using physics it would mean giving an impulse at that angle

    when using other behaviours it would be the angle of movement..

    if you want to figure out the speed or amount of impulse you could do that by basing it on the distance: distance(missile.x,missile.y,object.x,object.y)

    for speed divide a top speed with this distance and for impulse divide impuls strength with this distance..

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