- Home /
How to prevent NavMeshAgents from teleporting to the other NavMesh when crossing OffMeshLinks?
I have a NavMeshAgent
which, using an OffMeshLink
, crosses from one NavMesh
to another. However, when the agent does cross, it does so as if teleporting or snapping from one NavMesh
to the other. I would like it done so that the agent just appears to be walking between the two meshes, as if there was no link.
This question is a duplicate of this other question which links to a solution in StackOverflow.
If I remember correctly, you need to turn off "auto-traverse offmesh links" and manually detect when you get to one (you can use isOnOff$$anonymous$$eshLink), then turn off your Nav$$anonymous$$eshAgent, do traversing manually, and finally, re-enable the Nav$$anonymous$$eshAgent when you are on the other side.
It's a mess, but so far this is the best solution I have seen.