Hey guys, I'm currently programming an RPG game and there's one thing missing : I want to attack the nearest enemy and none of the others. So I thought I wouuld get all the near objects, and compare them to the main character, but I believe it can be tricky if there are a lot of them, so I thought you guys could tell me one more ergonomic way of programming it. The other problem is that I can't get the class near me, so I can call methods in this class. Thanks in advance !
![Twitter](/assets/twitter-4e19209ef84344ee0c433f4c7bad8d49.png)
![Twitter.hover](/assets/twitter.hover-1fb19a5bafc50deace8f88eaec867845.png)