Code Monkey home page Code Monkey logo

navmeshcomponents's Introduction

Please use the branch matching the version of your Unity editor: master for the latest released version, 2019.3, 2018.3 for up to 2018.4-LTS and 2019.2, 2018.2, 2018.1, 2017.2 for up to 2017.4-LTS, 2017.1, 5.6.

Components for Runtime NavMesh Building

Here we introduce four components for the navigation system:

  • NavMeshSurface – for building and enabling a NavMesh surface for one agent type.
  • NavMeshModifier – affects the NavMesh generation of NavMesh area types, based on the transform hierarchy.
  • NavMeshModifierVolume – affects the NavMesh generation of NavMesh area types, based on volume.
  • NavMeshLink – connects same or different NavMesh surfaces for one agent type.

These components comprise the high level controls for building and using NavMeshes at runtime as well as edit time.

Detailed information can be found in the Documentation section or in the NavMesh building components section of the Unity Manual.

How To Get Started

Download and install Unity 5.6 or newer.

Clone or download this repository and open the project in Unity. Alternatively, you can copy the contents of Assets/NavMeshComponents to an existing project. Make sure to select a branch of the repository that matches the Unity version.

Additional examples are available in the Assets/Examples folder. The examples are provided "as is". They are neither generic nor robust, but serve as inspiration.

Note: During the beta cycle features and API are subject to change.
Make sure to backup an existing project before opening it with a beta build.

FAQ

Q: Can I bake a NavMesh at runtime?
A: Yes.

Q: Can I use NavMesh'es for more than one agent size?
A: Yes.

Q: Can I put a NavMesh in a prefab?
A: Yes - with some limitations.

Q: How do I connect two NavMesh surfaces?
A: Use the NavMeshLink to connect the two sides.

Q: How do I query the NavMesh for one specific size of agent?
A: Use the NavMeshQuery filter when querying the NavMesh.

Q: What's the deal with the 'DefaultExecutionOrder' attribute?
A: It gives a way of controlling the order of execution of scripts - specifically it allows us to build a NavMesh before the (native) NavMeshAgent component is enabled.

Q: What's the use of the new delegate 'NavMesh.onPreUpdate'?
A: It allows you to hook in to controlling the NavMesh data and links set up before the navigation update loop is called on the native side.

Q: Can I do moving NavMesh platforms?
A: No - new API is required for consistently moving platforms carrying agents.

Q: Is OffMeshLink now obsolete?
A: No - you can still use OffMeshLink - however you'll find that NavMeshLink is more flexible and have less overhead.

Q: What happened to HeightMesh and Auto Generated OffMeshLinks?
A: They're not supported in the new NavMesh building feature. HeightMesh will be added at some point. Auto OffMeshLink generation will possibly be replaced with a solution that allows better control of placement.

navmeshcomponents's People

Contributors

dominykaskiauleikis avatar jakobhu avatar karl- avatar turadr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.