Giter Club home page Giter Club logo

unitynavmeshlecture-may18's Introduction

Unity NavMesh Lecture May 18

Project for the material from the lecture demonstration. Remember to reference if anything is used in assignments.

Requirements

  • Unity 2018.1 (the project was created with 2018.1.0f2).
  • VS2017 (Unity 2018 has issues with VS versions prior to 2017, community works fine).

Useful Information

  • You must use the UnityEngine.AI namespace to access the navmesh functions.
  • The new Unity NavMesh code is not currently found within the engine. You need to download it from the NavMeshComponents GitHub Repo. These components are available from version 5.6 and up, you need to change the branch you are on to access them.
  • You only need the "Assets/NavMeshComponents" folder from the above repo.
  • A realtime NavMesh scene can be found in the above repo in the scene called "drop_plank".
  • Old navmesh creation is bound to the scene, it is built by using the bake button in the navigation window and takes into account the paramets set in the bake tab. New navmesh creation is bound to the object or prefab allowing you to quickly swap objects in and out without having to load entire scenes.
  • NavMeshAgents should not have Rigidbody components. If you include them you will encounter multiple issues with angled navmesh areas.
  • You can use NavMeshAgents just like a rigidbody, applying forces to change their direction. This means you can use them for both the player and your AI units.
  • NavMeshObstacles don't have to carve the navmesh. If they carve the navmesh it will require the navmesh to update, thus updating every unit that is currently on a path. If you set them to not carve then all the agents will utilise their obstacle avoidance parameters instead when near to the object.
  • NavMeshObstacles (NMO) are limited in shape when compared to NavMeshModifers (NMM), only allowing for cubes or cylindes. As mentioned above though, NMO's do not require the NavMesh to be rebuilt to work. NMM's require the NavMesh to rebuilt everytime to work at all. Keep this in mind when utilising large NavMeshes.
  • You can use NavMeshLinks to create drops, jump spots, or to simply connect smaller navmeshes together to create a larger one.

Visual representation of NavMeshObstacle carving differences. Visual representation of NavMeshObstacle carving differences

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.