Need some help with code (Unity 2D game)

So I have the player and enemy. Hierarchy setup : PLayer/enemy > Arm > gun.

I have a script for armrotation that makes the arms follow the mouse cursor:

http://ift.tt/1c4l6b7

My question is how can I adapt this code to apply it to the enemy arm rotation so that the enemy arm targets the player at all times instead?

Thanks for the help in advance!

by Reapist via /r/csharp

Leave a Reply