I have a very simple Ai that on event begin play just walks around to a random reachable point which I have done many times before. I have a nav mesh bounds set up. It is green I checked. However the ai move to command seems to always fail.
Did you check, if the GetRandomReachablePointInRadius does return true for success? And if so, how does the returned vector look like? You can print the vector values or, what I prefer, use a DrawDebugSphere to visualize positions, which is far more intuitive.
Edit: forgot to mention: try to use GetRandomReachablePointinNavigableRadius instead.
Hey there @KinGxSeGaL1! Could you take a quick print of the random location and maybe a Debug Sphere there as it’s passed in? If the location is outside of the area for whatever reason or if the node itself fails that could cause MoveTo to fail as well.
ok so I tried this and it prints out 0,0,0 every time, and the random point in navigable radius function also does this
Sorry not 0,0,0 had the wrong thing plugged in however, it always prints the same coordinates being the location of the AI
What does the boolean of SetRandomReachablePoint return ?
false
That basically means that no reachable point has been found. Can you show your level (in the viewport) and your nav mesh please ?
So the Get random reachable node is failing, I’ve got a couple of ideas that could cause it. For your deer’s collision, does it block navigation? If so it could be just large enough where there’s no walkable terrain for it because it can’t get it’s feet down. You could test this by making another moveto and picking a location for it to travel to. This is to ensure the terrain is walkable for the deer (and this walkable for the node). If that runs fine, then it’s the node itself having the issue, if it fails then it is somewhere in the deer’s initial set up. Though I’ve seen this tutorial deer a ton here on the forums, and it usually works right out of the box.
Yeah so it looks like it is blocking it because it doesn’t move to as set location either. But I don’t understand why or how
Could be that the blocking volume was just large enough to cover the base of the character, so I’d remove it’s navmesh blocking volume setting first and try to move it, if it works then you may have to adjust it there.
If it doesn’t it could be a number of things like the character movement’s walkable slope being messed up (but since you likely never touched it, it and the default cubes settings should be compatible out of the box).
The traces themselves could be an issue but highly unlikely. When you attempt to do the manual moveto you set up, does the Output log say anything?
it just says abort. I even Deleted and recreated the deer to the exact scale and everything that was used in the tutorial and I still get the same error it really makes no sense.(Note: I made an ai from my default character and had him move to a set location and it also did not work. However in that case it did not even print on fail or success it just did nothing
Even Crazier Thing, I just loaded up a fresh blank project and migrated the deer there and set up a nav mesh and it works perfectly fine.
Hahaha that’s gamedev for you! I’m thinking it was the terrain itself, while the navmesh was green for valid, it may have needed remeshing again, which is a not so uncommon problem. 9/10 it remeshes on it’s own when things move around, but sometimes it doesn’t. Last case the cube had something changed from it’s base that made it fail to parse, though the navmesh renderer would usually tell you that by turning it red or not rendering on it at all.
For anyone that runs into a similar issue it turns out that when you enable world partition in the project settings it auto applies this to the nav mesh settings on all levels even ones that are not partitioned. To fix this I just went into the nav mesh settings and set world partitioned to false.
I did this but nothing changed.
I know this is an old post but I just want to share what solved my issue. I had this exact issue that the marked solution describes, at some point turned on partitioning and that messed up all nav-meshes on existing maps. To fix I simply deleted the old nav mesh and added a new one, it was taht easy