Making top down shooter for andorid with joystick
So im making a top down android game in whic player movemnt is controlled by on screen joystick input.. A gun gameobject is added to the player parent gameobject. I want it such that the gun faces in the direction of my joystick input.movement. If i am going up then my gun should face in the same direction. If im rotating the joystick clockwise the gun should also rotate clockwise..i can draw a line renderer to a certain range in the direction the gun is pointing, and spawn projectile that travels in that direction, but i dont know how to rotate the gun with the joystick input.. pls help.
Your answer
![](https://koobas.hobune.stream/wayback/20220613033037im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How do I give my top down game bullet spread? 1 Answer
"namespace or end of file expected" Not sure what to do. 2D Rouge-Like Tutorial 1 Answer
Player Respawn Problem, Bullets dont move! [C#] 0 Answers
Enemy pathfinding script for a 2D top down shooter game 0 Answers
My sound effect is not playing 0 Answers