Im making a game where you fight of waves enemies but I need the player to Turn towards the nearest enemy with a script, I have made a Prototype that makes you look at an enemy but it has 4 issues. 1, When the enemy dies the player freezes. 2, you cant quit targeting. 3, it can only target if there is only 1 enemy on the map and it has a specific Tag. 4, It has infinite Range.
If you can help me solve these please do that.