YouGroove Posted February 28, 2014 Share Posted February 28, 2014 I wonder how we could simulate breakable physics ? For example i have piece of some wood made of some 3 or 4 parts : Place them in the map with : No gravity or no physics When player hit them, activate physics and gravity and let them fall down. Or have two versions, one not broken and a broken one of the model, when player hit the model, remove the normal version of model and replace it with some prefab having all pieces together, with no gravity, than activate gravity and add a force from where the player stroke ? Quote Stop toying and make games Link to comment Share on other sites More sharing options...
DudeAwesome Posted February 28, 2014 Share Posted February 28, 2014 Pivot is parent. Childs are Wood Parts. If there is to much Force unset and delete parent. Wood parts are alone now and its own parents. ( Quote It doesn´t work... why? mhmmm It works... why? Link to comment Share on other sites More sharing options...
Rick Posted February 28, 2014 Share Posted February 28, 2014 I think the method of swapping the normal model and then broken model and apply physics at that point is good. Quote Link to comment Share on other sites More sharing options...
xtreampb Posted February 28, 2014 Share Posted February 28, 2014 I was doing this in my castle demo with that brick wall i posted a while ago using LE 2.5 If you want it to fall set the unbroken to a mass of 0. This will set it so that it isn't affected by gravity. In your object class, set the collision callback function to react to the unbroken model. have it call a break function that will move all the broken children to the location of the full model, set the velocity of the full model to each broken piece, show them and set their mass to 1. Keep in mind i was having some performance issues with 3.0 but i've been told that the cause of these issues have been resolved in 3.1. Quote bool Life() { while(death=false) { if(death==true) return death; } } I have found the secret to infinite life Did I help you out? Like my post! Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.