Search Unity

baking navmesh on non static surface or anything which can move

Discussion in 'Navigation' started by Jenifer_Jane, May 6, 2017.

  1. Jenifer_Jane

    Jenifer_Jane

    Joined:
    Jan 24, 2017
    Posts:
    69
    like question title say m trying to bake navmesh on a ship deck so characters can walk their and i have no idea how to do that since ships will move in water so i can't make them static.. any tutorial or idea how to do that quite appreciated. thnx in advance
     
  2. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    Are you using Unity 5.6? Definitely not doable in previous versions... That's the only way. Moving navmesh surfaces are not supported... here is a recent thread about it...

    https://forum.unity3d.com/threads/d...ating-a-navmesh-surface-navmesh-agent.467914/

    It's still somewhat doable, I have some example videos. If the surface is moving or rotating rapidly on multiple axes don't count on it. As is it can be finicky and can have poor results. But if it is moving/rotating slowly I've been able to make it work, with navmesh links as well. I've found it works better when a destination is a gameobject's transform as opposed to a vector3 in world space as the vector3 destination doesn't update with the navmesh.
     
    Jenifer_Jane likes this.
  3. Jenifer_Jane

    Jenifer_Jane

    Joined:
    Jan 24, 2017
    Posts:
    69
    thnx for your reply @christougher but i don;t have much exp with unity, using 5.6 but doono how to add navmesh without making static and method its telling in above topic is far for me to understand too complicated.. i think i have to write my own path finding system or something similar like that if its not supported by unity
     
    Last edited: May 7, 2017
  4. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    Add component NavMeshSurface. You bake it on the object itself, not the navigation window.

    If you haven't already search for: Unity blog 5.6 release, and go to the github website mentioned in the Nav mesh section. Download that for some great examples and the additional scripts.
     
    Jenifer_Jane likes this.
  5. Jenifer_Jane

    Jenifer_Jane

    Joined:
    Jan 24, 2017
    Posts:
    69
    thanx alot @christougher u made mine day gota give it a try i hope it will work for me
     
  6. Jenifer_Jane

    Jenifer_Jane

    Joined:
    Jan 24, 2017
    Posts:
    69
    @christougher it will be a medieval style wooden SeaShip so will not run fast and just will rotate at y axis can u please share those example videos you have
     
  7. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    The best videos are at the link I had above
     
    Jenifer_Jane likes this.