If your RequestDirectMove function isn't called

Hi all,

After lecture 154 I had an issue where my RequestDirectMove wasn’t getting called.

To debug this I had to dive pretty deep into the engine code and finally found a very nice tool to help :slight_smile:

I started by looking into the return value of MoveToActor. This returned a failed status.
After looking into the engine code, I found that part of the code used “UE_VLOG” instead of a normal UE_LOG. This turns out to be a visual logger.

If you go to Window - Developer Tools - Visual Logger, you’ll get a new debug window that you can use to debug (among others probably) the path finding.

In the end it turned out that my tank’s static meshes had “Can ever affect navigation” set to true.
Because of this, the nav building thought the terrain the tank was on was inaccessible and as a result it didn’t construct the nav mesh there. Because of this the start point of the tank was not on the nav mesh, causing a non computable path to be constructed.

Setting all components of the tank to not affect navigation fixxed this issue and RequestDirectMove is finally being called. :slight_smile:

1 Like

Thanks for sharing. We will have to cover that! https://www.unrealengine.com/blog/using-the-ue4-visual-logger

When would you say it’s most useful?

Well, One thing I’m planning is figuring out how to add my own entries into the visual log system.

I think its a very nice replacement for debugging when your using a UE_LOG every frame.
Instead of it filling up the log, you can use the visual logger instead - resulting in a much easier progression view.
Also, you can keep those logs present for later use without it disrupting your normal logging.

And it really helped me with the pathfinding logic :slight_smile:

I’ll post here when I figured out how to create your own logging to the visual logger :slight_smile:

Thanks for sharing. I’ve had the same problem. Just for reference, in version 4.15.2 (I’ve not checked in previous versions) the “Can ever affect navigation” flag has been changed to “Has navigation data”

I have the same problem, trying to solve it. Thanks for the tips.

I dont know why would you need to change anything on tank. To my knowledge our model have starting point in middle of horizontal box placed on tank, so starting point was “burried” in the ground beneth level ground and not inside navmesh bounds volume.
If you leave default 1 cm navmesh bounds volume tank’s starting point is outside that volume.
Ben in his video resized volume with mouse so it not explicit.
So to the point:
Anyone having trouble need to check if theirs navmeshBoundsVolume is at least 5 on z scale and just little above ground, most of volume burried so tank’s starting point is in volume.
Sorry for butchering english :D.
Hope it helps "D.

I’m having a very similar problem now, over a year later. I’ve tried setting the “Has Navigation Data” to false in the editor for all relevant static meshes. This did not work. I’ve confirmed that the problem is in the MoveToActor function as I get the “Trying to find path to Tank_BP_C_0 resulted in Error” error in the visual logger. I’ve also tried resizing and moving the nav mesh around. I’m not sure what else to do.

Edit: I’ve removed the tank treads and it works. This leads me to believe that the problem is related to the tank not counting as touching the ground (and thus not being able to use the ground-bound nav mesh) while the treads are attached. What is the fix for this? I originally made the tank body mesh smaller so it wouldn’t drag on the ground and create a bunch of unnecessary friction. Do I need to reverse this?

Edit 2: That actually only partially fixed it. After about a second the error comes back. Just to clarify, the MoveToActor() function is successfully called for the first 1 second(ish) of run time. Here’s a picture of the visual logger for clarification: https://media.discordapp.net/attachments/160912717878788096/535643005755981825/unknown.png?width=720&height=434

I’m so confused.

Well it is 2019 and I have the same issue. The AI tanks are just standing there and not moving at all. They are targeting me and the barrels are moving and shooting. Only the tanks stand still. I used the “Visual Logger” and it told me “Trying to find path to Tank_BP_C_o” resulted in Error".

What I found is when I move the Z-axis of my AI Tanks just a little up and actually above the Z value of my “NavMeshBoundsVolume” it works fine.

No need to change static meshes on my side.

Best regards, Peter

Thank you so much dratone - this helped a lot troubleshooting the exact same problem on my side :smiley:

Thank you so much dratone ! The habit of going through the source code can be super useful with these kind of trouble. You just saved me at least an hour of screwing around :slight_smile:

Privacy & Terms