Enemy movement

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.

enemy move waypoint gif.gif

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.

code new.PNG


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s