Hello!
I am fiddling with my first pathfinding behaviour. I am using a navmesh and the built in NavMeshAgent and it works great so far!
But I want the agent to take a wider, curved turn (because the agent-object is a vehicle) [Check the illustration below to see what I mean].
If I could edit the navmesh properties at some extend or even create my own navmesh agent, I could say that the agent can only go forward and Slerp the rotation towards the target.
Does anyone know of a editable NavmeshAgent template code??
Or have any other good tips on how to get the navmesh-agent to do a wider curved vehicle-like turn/rotation?
What I have tried:
- A empty gameobject with the unity NavMeshAgent component that goes towards a destination target
- A object with the vehicle model and a script saying it should only go forward and rotate towards the navmeshagent (this creates a nice and wide vehicle-like turn/rotation)
But the problem with this is that vehicle-object goes of the navmesh and collides with obstacles, because it takes a wider turn than the navmeshagent.
Illustration showing how the NavmeshAgent turns at the moment VS how I want it to turn:
Thanks for any kind of help!