Thursday, April 18, 2013

Programming - Exploding Crate and Barrel

Here are my finished crate and barrel meshes we had to make for programming. I ended up using these in my race level quite a bit. 

Check out the attached video to see the panning textures. In this material, and the crate material, I continued using sine, cosine, and tangent waves, along with competing panners to make some cool stuff.

 The first image is for the front and back of the crate. The bottom image is used for the remaining 4 sides of the crate. Same ole song and dance with masks, vertex math, and panners. I've gotten into the habit of making everything into parameters, so I'm able to change color, speed, size, and tiling of everything on the fly.


The basic kismet hookup for the barrel explosion is:
Damage threshold parameters to start the event on a trigger encompassing the barrel (If you shoot the barrel twice it explodes intead of 'charging up' for a few seconds). MIC on the barrel to change color and speed of the panning textures when damaged. Smoke particles activate on damage. Then the mesh is destroyed after a few seconds of 'charging up' and an explosion particle goes off. There is also a radial impulse that goes off with the explosion, damaging nearby actors.    

The crate is a prefab of rigid bodies. A trigger encompassing the crate activates a small impulse actor inside the crate prefab. When damaged, the trigger fires the impulse actor causing the crate to break apart, or explode. There are rigid bodies, in this case the little crystal things, inside the crate that also are activated when the crate explodes. These crystal rigid bodies are destroyed on collision with the player and a custom HUD counter appears, with an image of the crystal, in the corner, making it seem like the player picked up the item.

       

No comments:

Post a Comment