Download

Ship AI navigation - steering and avoiding obstacles

Hi everyone.
Is there a way to create navigation system for a ship? I already have a function that returns array of waypoints (FindPathToLocation node), but I can’t just say to ship “rotate to the first waypoint!”, because there might be a situation when this is impossible.

For example:
Red rectangle is a ship. Two black things - islands. Green - ship’s target. Yellow dots - waypoints, which are returned from Find Path to Location node. Thin black line - ship path, which I expect to get. In theory, the ship should reverse gear, simultaneously turning around, and then go straight to the target green point. I have no idea how to create such a system, which can solve such complex tasks… What should I do? Thanks. P.S. sorry for my bad English
exampleTask.PNG

You are looking at some very complex marine navigational behaviours. Building a ship’s autonomous guidance, navigation, and control system is not a fun task, specially if you don’t have some backound in AI and optimization.

You’re going to need a lot more than the points given by FindPathToLocation. You may start by looking at the unreal EQS system and try to work with it. After that, the hard part begins.

Good luck.

Thanks for the reply! I will check EQS and maybe some information about core of pathfinding, and how everything works.

Recommend looking into dynamic obstacle avoidance as well (search past posts). Live tracing doesn’t cost that much. It can actually be simpler and have less gotchas overall. The problem with Epic’s navmesh / pathfinding solutions is that when they work - they’re great. But when they don’t, they’re the greatest PITA there is! You’ll realize this after you’ve spent literally hours and hours troubleshooting why AI randomly stops moving, AI gets stuck at a certain point in a navmesh, when a BT acts unpredictably, or perception isn’t reliable… Its all the subtle things you need to watch out for. Did Epic even fix all the issues with nav invokers not working in packaged games???:wink:

Hmm, I’ll try. Thank you) And I totally agree with you about Epic nav system, they should focus on AI and everything connected with it in future updates. Maybe UE5 will solve all problems?))