int coordAY = charY + radius; // Y Coord of point A double distanceOA = radius; // Distance from char to point A double angleA = Math.asin(coordAY / distanceOA); double angleC = 360.0 / ((this.getHeading() / 61794.0) * 100.0); // Angle at char from point A to point B double distanceOB = radius; // Distance from char to point B double angleB = 180 - angleA - angleC; // Angle at point B from origin to point A int coordBY = (int)(Math.sin(angleB) * distanceOB); int coordBX = (int)(charX - Math.sqrt((distanceOB * distanceOB) - ((charY - coordBY) * (charY - coordBY)))); double distanceOTarget; // Distance from origin to target double distanceBTarget; // Distance from point B to target double angleCheck = 2 * Math.asin((Math.sin(90) / distanceOTarget) * (distanceBTarget / 2)); // Angle at char from point B to target