I am making a Top View 2D game and the player is a tiny jet.
The jet is supposed to move forward at all time.
How do I turn (Jet moves up and down with respect to the camera view ) the jet with a key input in 2D. I know how to do this in 3D with reference to TANKS tutorial.
Thanks.
You can use Mathf.Atan2 to rotate the object and use Mathf.Rad2Deg to convert the unit of angle.
There are many resource about 2D rotation in Unity:
- Trying to rotate a 2D sprite
- How to rotate 2D object with mouse?
- Rotate 2D Sprite Towards Moving Direction
- Rotate 2d object to facing direction
- Unity Simple 2D Rotation Script
- Google - unity 2d rotation
Thanks…