Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

NavMesh on large moving vehicles?

Discussion in 'Navigation' started by JoeStrout, Aug 31, 2020.

  1. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Our game is going to have some large moving platforms (think something like an airship or a ship-sized land vehicle). Players and other agents need to move around on these platforms, avoiding obstacles and each other just like they do on solid ground. But the whole game doesn't take place on one of these platforms; agents move on and off, so we can't just pick one and keep it at the origin, while moving the world around it.

    Is there any way to use NavMesh for this situation?
     
  2. Skynet766

    Skynet766

    Joined:
    Sep 13, 2020
    Posts:
    22
    I can think of one hacky solution: Have a copy of the platform somewhere, with it's own Navmesh. Have the bots move around that, and then "project" the AI onto the moving platform.
     
    JoeStrout likes this.