Gitou

GTNav 2D

Enemies that really chase you across platforms.

Version 1.0.0. See the Changelog.

GTNav 2D bakes your Tilemaps into a navigation graph for 2D platformers and drives Rigidbody2D enemies along it. Whether a jump is possible is decided by simulating the actual physics trajectory, and the agent replays that same trajectory at runtime. Jumps that the pathfinder accepts are jumps the character makes.

Features

Documentation

Page What it covers
Quick Start From import to a chasing enemy in about 5 minutes
Movement Profiles Jump height, speed, body size and how they affect baking
Terrain and Enemy Features Slopes, ladders, moving platforms, flying and ranged enemies, knockback and stun, bosses, baking options
API Reference Components, scripting API and the core algorithms
FAQ Troubleshooting and common questions
Changelog What changed in each version

Folder layout

GTNav2D/
  Runtime/         Core algorithms, baking, NavAgent2D, enemy behaviours, profiles
  Editor/          Inspectors, Scene view tools, GameObject menu items
  Presets/         Default Movement Profile and behaviour settings used by the menu items
  Samples/Demo/    Demo scenes: GTNav2D_Demo.unity plus one scene per feature in Scenes/
  Tests/           EditMode and PlayMode tests (only compiled when the Test Framework is present)
  Documentation/   This documentation

Demo scenes in Samples/Demo/Scenes:

Scene Shows
01_Basics Click to move one agent; walk, jump, fall and drop-through links
02_Profiles Two profiles taking different routes to the same spot
03_Slopes_OneWay 45° and 1:2 slopes, stacked one-way platforms
04_Ladders Climbing between floors
05_MovingPlatforms A ferry and a three-stop elevator; lava marked Empty with Nav Tile Types
06_Flying Flying chasers hovering and diving
07_Combat Melee attack (J) with knockback and stun
08_RuntimeBake Dig and build tiles with the mouse; background rebaking
09_Ranged A shooter that keeps its distance and a grenadier lobbing over a wall

Demo controls: A/D move, Space (or W / Up) jumps (hold for higher), S + Space drops through one-way platforms, W/S climb ladders, J attacks (07, 09). Debug keys: P enemy paths, N navigation graph, G next profile’s links (02), L state labels, R respawn. The marker above an enemy shows its state: yellow noticed, orange chasing, white wind-up, red attack, gray recovering or returning, blue stunned.

You can delete Samples and Tests after evaluating the package. Presets is used by the GameObject menu items. Deleting Samples also removes the Demo Player menu item and the GTNav2D Palette tiles that the Quick Start uses.

Requirements