I am making a top down shooter. The player needs to shoot where the mouse is. This is what I got, but it isn’t working very well.
double opp = player.gety() - mousePoint.getY();
double adj = player.getx() - mousePoint.getX();
double rad = Math.atan2(opp, adj);
player.shootAtRad(rad);
I do realize I am doing something terribly wrong. Any helps ?
I just want to know how to get the angle between the player and the mouse.