-
Book Overview & Buying
-
Table Of Contents
Godot 4 Game Development Cookbook
By :
In this recipe, we will create a scene with obstacles and create a CharacterBody3D capsule to navigate from one end of the world to the other. We will use the NavigationRegion3D node to set up the area on the map where we can travel. We will use NavigationAgent3D on the CharacterBody3D to interact with NavigationRegion3D to move along the navigation path.
For this recipe, click the + sign to the right of the Player3D scene we just completed to add a new scene. In the Scene tab, click 3D Scene. Right-click on Node3D and select Rename in the drop-down list and rename it World. Click on the word Scene in the main menu next to Project, then select Save Scene As and name it NavServer3D.
First, we will create an area with obstacles so that we can set up an area that we can travel in on the map: