
Explore pathfinding in Unity by presenting one solution per section, starting with a steering systems solution and advancing to the A* algorithm, then applying the code to a 3D environment.
Learn how to download Unity and use Unity Hub to manage multiple versions, create a basic project, and navigate core windows like hierarchy, scene, game window, inspector, and camera components.
Explore how to set up a text editor for Unity development using Visual Studio Code, install C# extensions, manage .NET versions, and attach scripts to game objects.
Set up a Unity project, organize folders, build a wall and an agent capsule, and implement a simple forward-moving script while introducing steering and obstacle avoidance for pathfinding.
Explore basic Unity gizmos for debugging a pathfinding agent, visualize forward direction with a red line, and use a Rigidbody with FixedUpdate to avoid walls and smooth movement.
Create a circuit path by adding a cube as a waypoint, collecting waypoints, and drawing red lines between them to form a nascar-style circuit in edit mode.
Improve pathfinding in Unity by implementing rotate toward the next waypoint to face it, handling obstructions, and rotating slowly for smoother agent movements along the path.
Learn to make the agent move to the next waypoint by checking distance to the current waypoint, advancing the waypoint index, and looping back to the start.
Learn to implement sensors and raycasts in Unity to detect obstacles using hit normals for avoidance directions. Visualize sensor tests and raycast results with lines.
Use side sensors in Unity pathfinding: a front sensor and angled side sensors detect hit normals to steer the agent. This approach is not perfect but provides directional inputs.
Refactor and unify game sensor logic in Unity by creating a reusable draw sensors method, applying front and side sensor variations, and optimizing hit detection for pathfinding.
Finish obstacle avoidance steering in Unity pathfinding by tuning sensors, implementing zero-avoid logic, and applying delta time based avoidance movement.
Explore the limits of steering behaviors for obstacle avoidance and learn why pathfinding is needed to plan full routes, balancing reactive obstacles with efficient navigation.
Create a Unity project with the Chuda option, set up folders for scripts and tile palette, and create a 20x20 grid using a 64x64 white square sprite.
Learn to use Unity's tile map system to set tiles and colors with a context menu, unlock tile color with flags, and implement a basic tile painter workflow.
Develop a 20 by 20 board with tile logic and a dictionary, using a singleton board and tile scripts for painting by position.
This lecture introduces simple pathfinding scripts in Unity, including a straight line and a Dijkstra variant, using initial and target positions, and green visualization of current position.
Prepare for the Dijkstra pathfinding workflow in Unity by building small methods, defining an initial position, optional target, and a search length to reveal reachable tiles.
We initialize the start node distance to zero and add the start tile. We use two queues to iteratively explore tiles, update next distances, and swap queues for Dijkstra-based pathfinding.
Mark blocked tiles as occupied in the tile map and check the next tile's occupancy during pathfinding to avoid blocked moves.
Set up a maze in Unity by assigning different move costs to tiles, turning some to zero and using max int for ignored cells, then recalculate distances.
Build the final path by backtracking from the objective tile to the start using previous pointers, then reverse the sequence to render the route on a 19 by 19 grid.
Learn how the a* pathfinding algorithm uses g cost, h cost, and f cost to guide the fastest path from origin to the objective, with protected abstract search.
Code the a-star pathfinding algorithm in Unity, compare it to Dijkstra, and implement open set, current tile, and objective tracking to map the grid and find paths.
Explore how this A* implementation uses origin cost and a distance heuristic to evaluate tiles, showing how stronger heuristics speed objective discovery and when dead ends reveal limitations.
Refine pathfinding code by fixing list usage and simplifying movement validation. Explain why a list is used over a priority list and how open set and yield return affect performance.
explore adding an a star pathfinding algorithm to a 3d environment by building a grid of nodes and a mesh, balancing node size for performance.
Adapt A* to a 3d world by mapping positions to a logical grid, performing a fast single-frame search, and preparing to move the agent using world positions in the path.
Convert tile coordinates to world positions as vector3 by scaling with node size, visualize them with gizmos in a Unity grid, and adjust grid size to manage detail and performance.
Use an array of invisible sphere colliders at each grid node, with radius equal to half the node size, to detect collisions with agents, ground, and obstacles. Identify obstacles via a common obstacle holder, block those nodes, and adjust the grid density by changing node size to balance precision and performance.
Create an A* agent in Unity that follows a waypoint path, avoids obstacles, and updates movement with speed and delta time using a star search across tiles.
Translate a world position to 2d grid coordinates by dividing by node size and rounding, mapping the agent’s world position to the correct tile for Unity pathfinding.
Implement automatic path updates in Unity by enabling an agent to continuously follow a moving target, refreshing the path every two seconds for smoother pursuit and reliable navigation.
Create an agent controller in Unity that manages multiple agents, assigns their following behavior to chase the player using a star pathfinding system.
Explore how Unity nav mesh baking enables a star pathfinding across static obstacles and dynamic agents, using varying agent sizes, walkable areas, and waypoints to connect levels and jumps.
Learn to use nav mesh obstacle carving in Unity to adapt paths around static and moving obstacles, balancing real-time carving with performance and steering-based avoidance.
Create a NavMesh agent script in Unity that moves the agent toward the player's position by setting the destination to the target position and updating every half second.
Explore how NavMesh obstacle handles moving and stationary obstacles, and how path carving and obstacle avoidance guide patrol agents around dynamic objects.
Learn to set up a navmesh agent for patrols, avoid conflicts with obstacles on the same object, and implement periodic destination updates, while noting navmesh limits for non-humanoid shapes.
Learn how nav mesh agents follow the player, avoid collisions, and reuse findings for efficiency. Create areas with different costs and walkable settings to influence routes and use mesh links.
Explore off mesh links in Unity pathfinding by configuring jump distances and testing agent navigation, including jumps and potential ladder climbs, to refine navigation behavior.
Add links manually in Unity to enable pathfinding with ladders and off-mesh connections. Adjust colliders and positions, test climbing, and note speed issues on off-mesh links for the next lesson.
Adjust off-mesh speeds by tuning the nav speed with a cost override for manually added links in Unity. Use nav mesh link data to trigger climb speed and animations.
Have you ever wondered how NPCs and monsters find paths from one point to another?
In this course you are going to learn how to create Steering Systems that avoid obstacles so your agent can run a circuit. As you are learning that, you are also learning how raycasts, sensors and Gizmos work.
You will learn to code the Pathfinding Algorithms A* and Dijkstra in C# and Unity. They will be made using Unity's Tilemap System so you can very easily understand how they work and what is going on.
Then, how to apply the A* Algorithm in tridimensional environments, making a controller of agents that can make those individual agents pursue a Player.
Lastly, you'll learn how to use Unity's NavMesh and create a system where agents can jump over empty spaces, climb ladders and all.