I'm newbie with Chipmunk physics and want to make an easy example of polygon explosion.
I started with the SmashLogo demo but in this example the are no explosions, only so much ball movements.
I know how to do polygon collision but my dude is for example how to explode a cube into many little pieces.
Polygon explosion
-
- Posts: 3
- Joined: Sat Jul 13, 2013 6:36 am
- Contact:
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Polygon explosion
So I have a demo of that in the vanilla C code too actually:
https://github.com/slembcke/Chipmunk2D/ ... /Shatter.c
It splits a polygon into voronoi regions similarly to how you'd implement grid based Worley noise. It's not commented well unfortunately. I could try and give you some pointers if you wanted to use it though. Try it out in the demos and see if that's what you think you want.
https://github.com/slembcke/Chipmunk2D/ ... /Shatter.c
It splits a polygon into voronoi regions similarly to how you'd implement grid based Worley noise. It's not commented well unfortunately. I could try and give you some pointers if you wanted to use it though. Try it out in the demos and see if that's what you think you want.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 3
- Joined: Sat Jul 13, 2013 6:36 am
- Contact:
Re: Polygon explosion
Thanks, i will try your code and post here the part of the code which define the 'explosion'.slembcke wrote:So I have a demo of that in the vanilla C code too actually:
https://github.com/slembcke/Chipmunk2D/ ... /Shatter.c
It splits a polygon into voronoi regions similarly to how you'd implement grid based Worley noise. It's not commented well unfortunately. I could try and give you some pointers if you wanted to use it though. Try it out in the demos and see if that's what you think you want.
-
- Posts: 3
- Joined: Sat Jul 13, 2013 6:36 am
- Contact:
Re: Polygon explosion
Really nice example.
I will customize the tank demo using the SmashLogo demo for the bullet and the Shatter Demo to apply the explosion/destruction to create a custom demo to show a fire&destroy chipmunk example.
But i'm surprised, the Shatter demo is new. I worked with Chipmunk 6.1.4 and I don't have any Shatter.c file. Nice to see new demos. Good work.
Thanks slembcke.
I will customize the tank demo using the SmashLogo demo for the bullet and the Shatter Demo to apply the explosion/destruction to create a custom demo to show a fire&destroy chipmunk example.
But i'm surprised, the Shatter demo is new. I worked with Chipmunk 6.1.4 and I don't have any Shatter.c file. Nice to see new demos. Good work.
Thanks slembcke.
Who is online
Users browsing this forum: No registered users and 24 guests