Question by
fgbg · Jun 08, 2020 at 12:09 AM ·
3dtransform.position
How to find the position 1 distance away from, and pointing to another object?
I am making two objects walk towards each other with A* Pathfinding project. What I'd like to do is instead of setting the destination as the middle of the objects (their transforms), I want to set the destination 1 unit outside of the player and enemy, on the side of them that are pointing towards each other.
Here is a diagram to help. I need to know how to calculate the green dots based off of each's transform position:
desiredpositions2.png
(6.5 kB)
desiredpositions.png
(6.1 kB)
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613000344im_/https://answers.unity.com/themes/thub/images/avi.jpg)