roof with bricks

Chipmunk2D Bindings for the Unity3D engine

roof with bricks

Postby meapps » Fri Nov 15, 2013 3:08 pm

Hi everybody i trying to build a simple house with real physic and the roof should be build with bricks and on the side two pillars. How can i make a real physic house that can brake into parts? I got the pillars working but still have troubles to build the roof. Any suggestions?

Thank you for your answers and help.

Yours,

Martin...
meapps
 
Posts: 10
Joined: Wed Sep 25, 2013 5:00 pm

Re: roof with bricks

Postby slembcke » Mon Nov 18, 2013 10:50 am

So one possibility is to make all the blocks overlap a little and then call sleep() to make them fall asleep while in the air. The downside of this is even the slightest tap will make the roof blocks wake up and collapse.

A better, but more difficult solution would be to break the roof into more parts when a collision happens. So you make the roof a single body, and wait for a strong enough collision to happen. Then you remove that body and add a bunch of smaller pieces. A lot of games seem to work this way, and I've had the best luck with it in the past. It does require some extra work creating both the intact and broken pieces though.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm


Return to Chipmunk2D for Unity

Who is online

Users browsing this forum: No registered users and 1 guest

cron