How to select an object in a 3D world with mouse only?

by Patrick B.   Last Updated August 17, 2018 09:13 AM

I'm developing a bot for a 3D game MMPORG. In it you move the Player Character with the keyboard in a 3D Landscape. Selecting objects or mobs is done exclusively with the mouse: point and click.

I have information about the position of each object on the map.

My bot is sending keyboard and mouse events to the original game-client's window.

What still gives me a headache is how to find the right point (X and Y coordinates) to click on. The attack-range of PCs vary.

For literally years I was trying out different ideas. For now, the best one I found, but still unsatisfying, is:

  1. Zoom in the PC's camera to maximum (camera view on PC's eye-level)
  2. Look straight forward, object's direction
  3. Randomly click inside a corridor (rectangle) in front of the PC until the object is selected.

This works well for melee (close-distance), but range-based performance is poor.

Tags : 3d bot


Related Questions