Cutting/Slicing an object while maintaining physic

0 favourites
  • 6 posts
From the Asset Store
Great quality fruit and slice items (png+ illustrator files)
  • I'm relatively new here so I would like to take this opportunity to thank all the other users for the great tutorials and "How do I...".

    This topic has been brought up a couple of times before, but I just had to confirm it myself. Is it possible for an object to be sliced in half and maintain it's physics behaviors, like become 2 separate polygons (think fruit ninja). and if not available will it become available and can it be done via a plugin?

    All help appreciated !   <img src="smileys/smiley1.gif" border="0" align="middle" />

  • The graphical aspect could be done in R0J0's Canvas Plugin , But the plugin himself doesn't support Physics

  • Or you could have 2 different sprites pinned to each other, and then whatever happens to break them apart just unpins them.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmm. I would suggest looking into internal graphics work. Canvas plugin obviously also a way to copy and inject/paste the graphics. Also have a empty sprite with physics.

    What you would need to do.

    1. Create Physics Sprite

    2. Paint physics sprite with image

    3. On Cut Condition

    • determine angle of cut and point of cut
    • create two physics sprites based on the larger size.
    • paint two new sprites with by copying the 2 sections(includes the overlap angel.
    • use some trig to determine which part of the 2 new sprites need to be set to transparent. Looking up some canvas features. something like fillpath might work.

    4. show 2 new sprites and remove old sprite

    Now here is the thing. I haven't done anything like this, but I know plugins like canvas give you the ability to alter the image base. This is a requirement and only way to do it. good luck.

    Here is a sample image of what I think you want to do.

    This way you can make the graphics changes nessisary and then cut them into to new sprites. Good luck :)

  • Thnx for the help jayderyu, I'll give it a whirl! :D

  • That wouldn't work because the collision polygon isn't affected by the canvas plugin and physics would work ...

    Conclusion , You can try it but you will only waste your time ...

    Source : R0j0hound response on a similar post ...


    Only if you do the physics by yourself ... That would be possible !

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