- Home /
Question by
Zirkekelbachlavich · Dec 02, 2018 at 10:01 AM ·
c#2dposition
How to get the position that is closest to a target within a given radius
So, basically my game has this mechanic where you can teleport within a certain radius to the player. So how it works is I take the position of the enemy and, given that the enemy is outside of the teleportation radius, I want to be able to find the closest position within the radius for the player to teleport to. Thanks!
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612183141im_/https://answers.unity.com/themes/thub/images/avi.jpg)