- Home /
AI on dynamic navmeshes and moving platforms? (Drawbridges, Elevators, Monorail trains, etc)
I've noticed that Unity's built in Navmesh system is static-only and does not allow for artificial intelligence to navigate dynamic objects, like lowered drawbridge, moving platforms, elevators, a bridge made up of stacked crates or other dynamic objects, etc. Navmesh Agents can't jump either, they are practically glued to the navigation mesh.
Is there any third-party AI replacement out there that supports this? I've been looking into RAIN and other alternative AI packages.
I was wondering if something like this could be possible in Unity, Even something like AI in CS:GO where they have the running+jumping capabilities of a player and efficiently generate paths using a navmesh, (even jumping over and crouching under obstacles automatically!) and if there were moving platforms with a dynamic navigation mesh, they could move around on their own while standing on such moving platforms, like elevators, or a sliding catwalk.
It may prove difficult, but it could prove possible with dynamic objects that are not in motion, like a drawbridge that can be raised/lowered, allowing AI to traverse while it is lowered.
I'm trying to think of many ways these kinds of things could be achieved in a well-polished and optimized way. Any ideas? I'm feeling ambitious.
Answer by tiagorpg · Aug 26, 2018 at 07:17 PM
the drawbridges are easier, use a offmesh link deactivated, and activate it when the bridge is down, the elevator i didnt test yet, but you can make the ia wait in front of it until it is in position, then activate the offmesh link and make it enter the elevator, wait again until it is in position activate the other one and them finally when the agent is at the correct mesh order it to go to the target
maybe that is why the usually just teleport people
i just tested the bridge again, making the links auto update and move with the bridge works, so if the bridge is in position the links will be on the mesh, but i dont know why the agent sinks in the bridge, because both of them have colliders, so maybe the off link is really just for jumps