Sometimes the player will fail to move but sometimes not.Why that happens?I have navmesh correctly set.I notice one case is that if there spawn a box or so at runtime which block the player’s SimpleMoveToActor’s path,player will not move at all.(SimpleMoveToLocation doesn’t work every time either)
AlsoI want to use AIMoveTo node because the SimpleMoveToActor node doesn’t return the result of the moving,but i’m a playercontroller not an AIcontroller…Is there a way for a player to use AIMoveTo node?Thanks very much!
PS I am sure I have set navigationmesh generation to dynamic already.
After toggling on visual log:I have found this,it says invalidated while failed to move:
Could be the Vertical Deviation from Ground Compensation be part of the problem? I’m not sure, but if you want to try, it is in Project Settings->Navigation Mesh->Query.
Thank you very much for your advice.However,I tried that but does not fix for me.
For further investigation,I found that before PIE,the navigation works well and generate a good green area.But when I play in editor,one part of the area become red like below,I don’t quite understand what that means,and why that happens…Could you please help me?Thanks a lot.
As far as I know (which is not much) that usually happens when you have some dynamic/movable object, creating a “Dynamic Obstacle”. For example, I have a door that opens for the player and for the AI, and this door have a Collision Volume
as you can see, I have that same red area.
Don’t you have any collision from some volume? Maybe from some mesh?
You can easily check the collisions in your map by Show->Collision (or Alt+C)
Oh I found there’s a blueprint set to affect navigation a little far away from this area,after changing bCanAffectNavigation,this red area doesn’t show in game!
About the SimpleMoveToActor…
Usually doesn’t work if the target actor is unreachable (and this often happens), even if only one of the axis is unreachable, the actor is not even gonna try to reach it (of course I might be mistaken, but that is what I’ve seen).
Anyway, you could use SimpleMoveToLocation, and a few more nodes to even get if the actor reaches the desired location of the actor. Here’s the setup:
[You can copy and paste this into the blueprint ]
Thanks for your advice!I’ll try it later!
I was reading over this thread and I was wondering if you are still experiencing this issue?
If not, was it 's suggestion that helped you resolve your issue? If this is the case I will select the suggestion as the answer.
If you are still experiencing this issue could you answer the following questions:
- Can you reproduce this issue in a clean project?
- If so could you provide a detailed set of steps to reproduce this issue on our end?
We have not heard back from you in a few days, so I am marking post as the answer for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.