Choosing Image Point for Impulse

0 favourites
  • 7 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • Hello dear community!

    First of all, I am newbie at Construct 2. Go easy on me. <img src="smileys/smiley1.gif" border="0" align="middle" /> I have a problem about Impact physics. I have a hand-grenade in game and I want to make when it explodes, some objects around it should blow away and just get away from it.

    I am trying to do this with Impulse physics. But I must manually choose an image point which impulse impact on it on object. If I choose origin as image point, movement of object will be ok; but there will be no rotating effect on object at all. Force or impulse on center on mass do not have any impact on rotating force by law off physics. It seems so unrealistic to me. So, I want to change image point instead of origin.

    I thought adding an image point to nearest point to explosion; but I could not find anything to do this during running program (Like AddImagePoint[X,Y,number] whatever). On the other hand, it is very awful to prepare image points before running program for every possible position in wall for grenade. Is there any solution else?

    I am sending an image to understand situation well. Thanks...

    <img src="http://s10.postimg.org/x28bf3yqx/impulse.png" border="0" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can make it react more believably with just four image points (one in each corner) provided you calculate the force in a certain way..

    First, instead of applying force to just the closest imagepoint, apply it to all four.

    and secondly(you may have already done this), make the forces inversely proportional to the distance from the explosion...(so the imagepoints closest to the explosion have a stronger force applied to them)

    It won't be perfect, but done this way, it will make objects rotate if the explosion is in the right place, like in your diagram.

    you seem like you know what you're doing, but if you need more help i can send you a .capx i made a while ago with this in it.

    a more 'realistic' way would be to make the explosion shoot out a bunch of smaller physics objects that collide with everything around it. (although that's overkill)

  • yeps the scrapnel aproach i was also thinking, it works pretty good,

    made an example..

    scrapnel

    (click to shoot scrapnel)

    ps: not sure why it doesn't spread in 360 degrees, well it good be improved

  • When I tried it seems a good solution, however it did not work on complicated sprites or thin-long shapes. I still need to find another way. <img src="smileys/smiley19.gif" border="0" align="middle" />

    Maybe I should try another method else Impulse.

  • yeps the scrapnel aproach i was also thinking, it works pretty good,

    made an example..

    https://dl.dropboxusercontent.com/u/61666915/scrapnel.capx

    (click to shoot scrapnel)

    ps: not sure why it doesn't spread in 360 degrees, well it good be improved

    It is from beta. I am using stable version and could not open it.

  • Just download the latest beta ,

    I don't think he is going to downgrade his C2 just for you

  • Shrapnel is a good way to deal with explosions, but it is not perfect. I am trying to find a good way to use particles as shrapnel instead of sprites.

    Other ideas are still welcomed! Please share how you may deal with this problem.

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