- Home /
How can I make the sprite and collider of my enemy rotate based on the position of the player?
What script would be needed to make the image and the hitbox rotate based on the position of the player? I want to make it so that the enemy is always facing away from the player. Since my game is 2D, how would I make one side of the enemy always facing away from the player? I am creating a enemy who moves away from the player, so I need to make it look like it is facing away from the player, and have its hitbox move with the sprite.
Your answer
Follow this Question
Related Questions
2D Endless runner spawning on top of each other? 0 Answers
ArgumentException: Input Button right is not setup. 1 Answer
Where could I start with making a level editor where you can create your own terrain in Unity 2D? 0 Answers
2D Unity scale reverse script not working (C#) 0 Answers
How to create a collider between 2 points in a 2d game? 1 Answer