Page 1 of 1

roof with bricks

Posted: Fri Nov 15, 2013 3:08 pm
by meapps
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...

Re: roof with bricks

Posted: Mon Nov 18, 2013 10:50 am
by slembcke
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.