Final Boss' Laser

 Author: Daniel Jackson

    The boss' laser much like the minigun is already a formidable weapon so instead of making a major update to the gun directly, I create an additional entity in the room which when hit with the boss' laser creates an additional one 'refracting' the laser in a different direction. The problem was pointing the new laser in the proper direction and having it correctly turn on and off when hit by the boss.

    I spent several days attempting to correctly get the angle of collision between the hit entity and the boss dynamically so that it would update as the boss moved. I was generating the correct angle after a while but was having an issue rotating the new laser by the correct amount. Unfortunately, I needed to move on to work on and complete other aspects of the game so instead of calculating the correct angle as I would have liked, I had to settle for flipping the correct axis (x or z) to produce a similar but not quite as accurate effect. Then to turn them on and off correctly, on a collision with the boss' laser I turn their laser on then if their laser is on and I don't register a collision with the boss' laser I turn them off.

Comments

Popular posts from this blog

Adding assets to every enemy -- Owen Meyers

Sphere to AABB collision