Hello
Im making ship game, where NPC should be able to walk on ships. As largest ship is going to have max 150 to 200 navingation points and max 25 to 30 agents, i was thinking point graph should be the simplest solution. Unfortunetly i cant wrap my head around how to move it with a ship.
Is there any fast and dirty way to deal with it? Performance is not an issue right now. I would like to avoid recast graph if possible. Not shure how to deal with open world where worlds 0.0.0 position is changed from time to time (dealing with floating point erorr)
There are no current plans for NPC to change ships so changing platforms isn’t a problem. Bigger problem will be steep almost vertical stairs and climing rigging.
Any pointers, you could give would be really aprriciated.
But I do want to warn that I don’t think this will scale well. There’s ways to mitigate this, such as by only scanning the area of a ship rather than the entire point graph, scanning only when movement is requested/needed, etc- but even still, there’s this important note on the breakdown of graphs in the documentation, main points bolded:
Using this graph type is discouraged unless the other graph types just don’t work for your game.
Pros:
You are in full control over where nodes are placed. You can even make 3D pathfinding with this.
Fast to scan for simple cases, but can get very slow if you are not careful with your settings.
Cons:
Requires a lot of manual work to place all the nodes (or you have to write a script to do it automatically).
It’s hard to get good quality paths without a very large number of nodes.
Pathfinding is often slow due to the high node count that is required.
Slow graph updates.
Apparently it’s worth mentioning three times haha. But by all means, I could totally just be doomposting right now and it might be totally fine. Regardless the code is there if you want to use it
Actually yee, Im stuck with recast graph and ood localSpaceRitchAI movement, its teleporting from time to time, Going to corners and getting stuck, on Link2. Using it for stairs on ship. Will try to put two link2 on each stairs, hoping it will solve atleast some of the problems.
Have feeling that navigation on moving platforms currently is a bit broken. Or it is just my seetings that are really broken.
Are you using Off-mesh Links on the moving platform? Also can you provide a video of getting stuck in corners? I’ll better be able to understand what may be causing that if I see it.
Also I’m going to reply to your other questions from your other thread in this thread. Can you show me your scene setup in the Hierarchy?
I don’t think off-mesh links have been properly tested with the local space rich ai. If you register a custom callback to handle the traversal, it can probably work. But you’ll have to do some math in there to transform all coordinates to your ship coordinates.
Also keep in mind that the off-mesh links cannot move in world space. They must stay in the original position where the graph also is. The graph never actually moves, it’s just the agent that pretents that the graph is moving.