Tuesday, September 10, 2013

Update 17: Alpha 1.45 - Explosive Walls

I've been working on destructive terrain, and I decided the best way to blow up something, is to build it up first, literally brick by brick. As my current walls were just a (1,0.5,0.1) sized wall, I figured I should build it with 50 individual bricks into a prefab. Then when I apply force to it, it will spray across the screen in 50 pieces not one!




My first hurtle was that when I applied the rigid body property to all of the bricks, the wall tended to wobble like jelly (Jello for you Americans). I was able to solve this by not applying my RigidBody component (to enable physics) until the explosive force was applied. It actually turned out to be easier to apply this component to items in the blast radius rather than every single item on the screen. It's probably cheaper, (resource wise), too!

Next it was time to stack a few of these prefabs on top of each other, and then apply an explosive force to a random point in front of the wall... the resultant explosion was... unexpected. I'm still not sure why the explosion is along the z plane...




Moving on, applying the new prefab to my test level, it gives a far more satisfying burst across the screen when I throw grenades.




There is no download for this, I'm still adding some the next feature... which is visible in that last screenshot...

No comments:

Post a Comment