News › Forums › RAIN › General Discussion and Troubleshooting › AI charging off Navmesh
Tagged: navigation, off mesh, pathfinding
This topic contains 1 reply, has 2 voices, and was last updated by Sigil 5 months ago.
March 5, 2022 at 4:34 pm #40162
Hi all, loving Rain so far but struggling a bit with finding enough documentation for some things.
Specifically I am having issues with an AI I am trying to implement.
The AI follows waypoints, detects player and then pauses with a threatening animation before running fast towards the player, the idea being that if the player doesn’t get out of sight before the ‘threatening’ part is finished then they are toast!
This all works ok(ish) the problem I am having is with the Navmesh; the AI is on a plateau in the middle of my terrain. The navmesh only covers this area and not the surrounding parts of the terrain however if the AI detects the player then it will charge to their position regardless of where they are even if they are not on the navmesh and even though I have unchecked ‘allow off graph movement’.
I have a navigation target attached to my player which the AI uses as a move target for the ‘charge’ movement but I assumed it shouldn’t be moving off-mesh regardless?
ANy help appreciated, been looking at posts and fiddling with variables for a while now!March 11, 2022 at 1:00 pm #40170
Sorry about the late reply.
I will go test to be sure on all this (in case some bug has changed this) but the intended behavior when you uncheck Allow Off Graph Movement is that our pathing won’t finish the path to the target if it is off the navigation mesh. If you check the Draw Paths in the Navigator tab you should see the path follow the navigation mesh but end at the edge.
Now this is based on our original motors, if you are using any custom motors or navigators it is possible they are ignoring this information.
In addition to that, our move node in the behavior tree notes when you have a partial path like that, and fails if it reaches the end but doesn’t reach the target (so that you can handle the failure to path).
I’ll go double check this stuff to be sure.
You must be logged in to reply to this topic.