I tried to make simple game where player object would travel to given destination in navmesh.
I use unity plane objects to denote “roads” which on player can move. Everything else works but I would like to snap target object (position determined by mouse click) to center line of road plane. I coudn’t find a way to extract global space coordinates from plane object.
I don’t have any grid in my game, so roads can be arbitrary placed. Currently only horizontal and vertical but plan is to have diagonals as well.
How I can achieve snapping?