I want to rotate the 2D missile with touch controls

Hi i’m making a game and i spent days to resolve my problem but i didn’t succeeded my problem is i want to control a missile with touch i will explain , first i will touch anwhere on the screen and if i rotate my finger to the left the gameobject must rotate left and vice versa , the game object have a rigidbody2D
can anyone help me please

I can’t imagine how you’d do this with either capacitive or resistive touch screens. you would need a second finger to track or you would need to track the angle the finger was dragged out instead of keeping it in one place. this is because current touch screen technology only tracks the touch location and not the orientation of the finger. another possibility is the use of custom hardware to track the rotation, but that would be a pretty hard road to go down.

to do the two-finger solution, track either the angle or angle change (depending on how you want it to act) between the fingers and use that for rotation. for the dragging solution, track the first touch location and use the current location as well as the location where you let your finger up as the second location for tracking the angle. arctangent is your goto trig function here.