A. Answers from PEZ and David Alves recommend aiming at an X,Y coordinate and then making sure it is not off the map. The coordinate can then be translating to a bearing from the robot position.
- PEZ: If you have the distance to the target and from it's heading and velocity have calculated a new bearing. Then it sounds like you have two sides and one angle of the triangle. Or is this maybe a question of BulletTravelTime? For most target bearing guesses I use a guess of the target's new coordinates, which easily can be moved inside the battle field using min() and max(). Then I can convert this to target bearing.