Breaching Charges (Revised), and Magnetic Shield

Most of my work tonight went into fixing the breaching charge feature, which was functional but broken. Essentially, charges would be placed around corners or between wall segments if you were in a certain position against the wall.

My solution, unfortunately, is a less efficient and more object-heavy solution. 

Each destroyable wall segment generates nodes around it, used in calculations. There's a dummy object that orbits the player, based on their facing direction. Pressing the key to place the charge will, if close enough, create a charge and move it to the node nearest to the dummy. 

If I've lost you, basically now the charge is placed based on where you're facing, rather than which direction you moved towards the wall in. Apart from the under-the-bonnet stuff, it all looks the same, so no screenshot there. 

Another feature I worked on this evening is the magnetic shield - a piece of equipment used to deflect incoming rounds when activated. It can only be used for a short time, and it prevents the player from firing, too. Primarily, it's mainly used to close the gap between the player and the enemy when no cover is present. 

It wasn't as difficult as I imagined to get working. Essentially, the bullet object checks whether the shield is active, and if it is, checks whether it's within range. If the shield is on and the bullet is close enough, a switch is flicked and the bullet's direction is changed. To ensure a stray round doesn't clip the edge and shear back towards the player, it chooses it's new direction based on the direction of the player and goes by that.

Tomorrow I'm hoping to work on the final piece of equipment, called the scan dart. If I have time, I'll also create the smoke grenade, completing the set of grenades available (frag, stun and smoke). 


- Rob

Update: I totally forgot! Now, when a breaching charge detonates, time slows briefly for cinematic effect. This also affords the player a brief window of opportunity in which to hammer out a few shots. It's pretty rad.


Popular posts from this blog

A productive day!

Excuses and a minor update

Inventory / Weapon Icons