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...
roof with bricks
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: roof with bricks
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.
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/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Who is online
Users browsing this forum: No registered users and 1 guest