Download

AI Pathing issues.

Hey everyone, I’ve ran into a wall on this project I’m developing and looking for some fresh ideas on what to try next. I’m pretty new the unreal 4 but have been working through all the tutorials to do with AI, nav mesh’s and pathing that I have found. The project is a driving simulator, and I’m having trouble getting the pawn AI for traffic to travel one way down a street. I can do the target point simple move to, however the game needs to run for awhile so having a goal that can be achieved in 1 minute or so isn’t ideal. I’ve tried nav link proxies but the left to right and right to left setting doesn’t seem to work the way I need it to (if theres nothing blocking the path back it will ignore the left to right setting and just travel back right to left. I’ve also tried to use matinee’s and triggers to force the ai to take a desired path but this isn’t really an ideal option if there are lots of cars on the road. Does anyone have some ideas on what to try next to get the pawn to travel only one way on a nav mesh? Currently the AI is just finding a random point in a radius around the pawn and attempting to travel towards it.
Thanks in advance.

Still having issues if anyone has an idea on how to go about it.

Hmmmm … haven’t tried it myself but would you sequence your nodes in a way … so for example L1 – L2 – L3 and R1 – R2 – R4 … then when your vehicle gets to a node, let is find the next incremental sequence and move to that node.

I would also then probably try to use either a unique texture or a hidden bounding box (or something) that is between the two points to ensure that care stays on the road and doesn’t try to veer off.

Deepscratch from the Torque 3D forums did something similar using an AI Decal Road system, where the car would drive on the decal road and not veer off. It handled turns and all kinds of things like that: http://www.garagegames.com/community/blogs/view/21476.

Maybe you can contact him and see if he can help you. You probably won’t be able to do something super efficient without doing some custom C++ work.