I want to make my ship circle another ship, and the turnTowards method was not what I was looking for. How do I make it keep the same distance while circling and point to the ship?


1 2 3 4 5 6 7 8 | public void circleAroundPoint( int otherX, int otherY) { distanceAlongCirc += 25 ; int newX = cos(distanceAlongCirc) * radius; int newY = sin(distanceAlongCirc) * radius; setLocation(otherX + newX, getY() + newY); } |