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:

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