Code Monkey home page Code Monkey logo

collide2nav's Introduction

Collide2Nav

A tool to automatically generate navigation polygons based on collision objects.

The purpose of this plugin is to speed up level building especially when working with complex collisoin shapes and navigation paths. You only have to place collision polygons and it will generate the nav polygons for you.

Instillation

Clone or download this project into your

res://addons/

so that you have

res://addons/Collide2Nav/

Open a Godot project -> Project -> Project Settings... -> Plugins (tab)

In the list, select Collide2Nav, click the right-most dropdown box and select active.

If it does not appear, check your addons folder and possibly restart the engine if you added it while it was running.

Usage

Now, when editing a scene, if you select a NavigationPolygonInstance in your scene graph, there should be a new button in the viewport's menu toolbar that says, "Generate from Bodies."

The button

Clicking this will begin ateempting to generate the navpoly.

The plugin will find the bounds of all the tilesets in your map and create a large rectangle navpoly.

It will then find all the CollisionPolygon2D nodes and generate polygons at their locations. It does this to "mask them out"

Your AI should now be able to navigate everywhere within your TileMap that didn't have a collision polygon already there.

collide2nav's People

Contributors

florianeagox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

collide2nav's Issues

Doesn't work in my testing in Godot 3.2

When selecting a NavigationPolygonInstance node:

 res://addons/Collide2Nav/Collide2Nav.gd:27 - Invalid call. Nonexistent function 'get_parent' in base 'Nil'.

When selecting any other type of node:

res://addons/Collide2Nav/Collide2Nav.gd:31 - Invalid call. Nonexistent function 'get_parent' in base 'Nil'.

Also, the README says "Instillation" and it should be "Installation".

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.