Rotate or Aim Towards Mouse or Object in 2D - Unity [ENG]

Опубликовано: 03 Октябрь 2024
на канале: Krister Cederlund
105,607
1.5k

We will create a script that rotates a game object so it aims or looks at the mouse or another game object in Unity.

Let your turret auto aim towards a target or mouse.
Let a character rotate towards another game object or mouse so it can move in the towards it.

Want to do this in a 3D project? Check this out.
   • Rotate towards object in 3D - Unity [...  

Please like and subscribe if you want more tutorials.
Also all feedback is welcome.