Hi guys
I’m currently playing with NavMesh, my goal is to let my pawn (a simple car) moving towards the location where I click on the map.
I’m using an AAIController and a custom UPawnMovementComponent to achieve this. I copied most of the codes from the UFlowPawnMovementComponent to my own implementation for now, but additionally inside the TickComponent(…), I’m updating the pawn’s direction with its velocity.
Now, most of it works as well, but one thing I can’t accept is when the pawn moving, it’s really ‘floating’ in the air, or ‘sinking’ underground, and I have no idea how to make it snap on the ground.
Please if anyone can point out my mistake, or is this idea not correct from the beginning?
Thanks for any help!
I will post some screenshots and wish they can help me to clarify my question:
This is the car and the map, the car should move to where I click on the map. the map has a somehow working navmesh.
But when the car is moving it floating over the ground, especially when going upstairs.
And when it’s moving to a lower location, it will sink into the ground.
I’m aware the navmesh is a little above the ground, is this the reason the car pawn behaves like that?