Heyhey,
i am havin a problem with my pathfinder:
![](//forum.arongranberg.com/uploads/default/original/1X/f087d8d10ec3062d206791b6cdda004b7210e948.gif)
so as you can see, that car has a pretty crazy driver on board which is alway hitting the wall.
Iam using the AiPath example script: http://pastebin.com/7p1RfBDL
and these are my settings:
![](//forum.arongranberg.com/uploads/default/original/1X/54bf334d3e363e8ee98071688e54cf6b7d868494.gif)
could someone tell me why this is happening?
iam using a grid path by the way
and, iam having another problem:
the car is driving backwards somehow?
Hi
Could you show a screenshot of how the graph looks?
The AIPath script will rotate the character so that the Z axis points in the forwards direction since this is the unity convention for the forward direction. Try to rotate your mesh 180 degrees.
hey, its been a while but i wanted to go back to the game - so here is how the graph looks:
![](https://forum.arongranberg.com/uploads/default/original/2X/0/08558809fdebfe2132f9d397f0c1b03e27e68e21.gif)
Hi
I meant how the graph looks in the scene view.
oh, sorry. you mean this:
Hi
Ok. It seems your graph has a quite high resolution. This means that the calculated path that the car takes will be very close to a wall (because there are nodes there that it can use). You might want to reduce the resolution a bit or use some other approach like a point graph to make sure it moves more in the center of the road (I believe there was another thread that you started about that a long time ago…).
thanks!
so i tried the point graph now. still, the car is behaving weird ![:smiley: :smiley:](//forum.arongranberg.com/images/emoji/twitter/smiley.png?v=9)
![](//forum.arongranberg.com/uploads/default/original/2X/3/36c284679ce47c93c5c75393de826b42227e21e3.gif)
these are the settings of the ai path motor
and the script:
http://pastebin.com/GxRC4xdC
Hi
It tries to move to a point really close to it, but it overshoots slightly while rotating which makes it worse.
To solve it, increase the distance a bit to the point it tries to move to (increase ‘Pick Next Waypoint Dist’ and ‘Forward Look’).
![](//forum.arongranberg.com/uploads/default/original/2X/c/ca8aa93790a09709b92123c22c93e18c993beb0b.gif)
jiha. works!
thank you for your awesome help ![:slight_smile: :slight_smile:](//forum.arongranberg.com/images/emoji/twitter/slight_smile.png?v=6)
1 Like