Hi, my new project is a turret that locks on the target...
The target is in a 2D space and has 3 coordinates, x and y...
How to calculate the angle of which turret has to move?
Is it something like this:
I know this isn't the whole thing because what would i do if angle was 0 at the start?Code:... angle = 90; scanf("%d", &x); scanf("%d", &y); for(i=0;i<x;i++){ angle = angle - (angle/2); } for(i=0;i<y;i++){ angle = angle + (angle/2); } ...