For my assessment prep I have been working on the 2D Top down game, previously I have been stuck with the enemies that stare at my player though the walls. this was an issue as I was instantly dying as soon as I left the cover due to the rain of bullets upon me. I have been sifting though lines of code and I have found a way of making the enemy follow his waypoint path and only shoot on these axis. This is much better and looks cleaner as even though walls the enemy was always looking at my character.
I removed the ‘Trig2 Rotation’ script as this was what was controlling it and added these 3 lines of code which when broken down make the enemy focus/ aim towards his next way point. This is more eye pleasing and simple put its a lot better.