When playing, if you move a NavMeshAgent with editor’s XYZ handles, it stays on the nav mesh.
I need to move an object to my cursor’s position, but have it constrain to the nav mesh in the same way.
If I do “transform.position = raycastHitPoint”, it takes it off the nav mesh. I tried using SetPosition with high speed/accel values, but it’s not a great way.
I meant that I want it to stay on the nav mesh, not leave it. I think I found the solution a second ago.
– Stardog