"AI Move to" not working - please help! #45
-
Firstly, thanks for making a great plugin! I'm a beginner with UE5 but managed to get good results in just a few days. I've got my dungeon setup fine based on the first person template with mission graph, doors, keys, etc. I've also added in spawning enemy's, and implemented basic "follow" AI using this tutorial: https://youtu.be/sVV32qivy1A?si=ymmHzY2_GckwMnIA I've added debug messages, and can see that the enemy can "see" me and tries to move, but the "AI Move to" continually fails with "Abort". Any ideas, tips or hints? Would you consider creating a YouTube tutorial showing how to add AI enemies to the dungeon? I haven't purchased the plugin from the marketplace yet, but I definitely will as I want to use the minimap, but I just want to get some basic AI working first. Many thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
When generating a dungeon at runtime, it’s necessary to update the navigation mesh after the dungeon is generated. Please check the Runtime Generation settings of the RecastNavMesh. By changing this from Static to Dynamic, the navigation mesh will be rebuilt. It can also be updated via Blueprint after BeginPlay. If navigation mesh generation is disabled, an error log will be displayed. |
Beta Was this translation helpful? Give feedback.
-
Thank you so much for your reply. Sadly, I already have that option set: Looking at the Output log, I see this message: Full log here
Thank you very much for any further help you can provide. |
Beta Was this translation helpful? Give feedback.
-
Actually, I fixed that warning by enabling this setting: So now I don't get any warnings. But still my AI doesn't move. My enemy event graph looks like this: Full log here
|
Beta Was this translation helpful? Give feedback.
-
I’m not sure why movement is failing. I created a sample where the enemy uses AI Move To to chase the player. The enemy successfully tracked the player. If the enemy does not move, it's possible that the navigation data is incorrect, or the enemy cannot reach the player's position. It might be necessary to investigate whether the navigation information is being generated dynamically. |
Beta Was this translation helpful? Give feedback.
-
I have fixed the issue by deleting the nav mesh and re-adding it, and my AI started working straight away! I tried this before and it didn't work, but I did it again and this time it did! 🤷 Thanks again for your help with this problem. |
Beta Was this translation helpful? Give feedback.
I have fixed the issue by deleting the nav mesh and re-adding it, and my AI started working straight away! I tried this before and it didn't work, but I did it again and this time it did! 🤷
Thanks again for your help with this problem.