-
-
Notifications
You must be signed in to change notification settings - Fork 50
Addon Classes
This page is meant to give you a high level understanding of the components of the Road Generator addon, and how they work together. These primary components include:
- RoadManager (Node3D)
- RoadContainer (Node3D)
- RoadPoint (Node3D)
- RoadSegment (Geometry, hidden)
- RoadLane (Curve, for AI/steering)
- RoadLaneAgent (Node, for AI/steering)
The parent most container of all Road nodes in the scene, managing settings and providing utilities and settings that apply across all of its children RoadContainers.
A RoadContainer is analogous to a single "road", containing two or more RoadPoints, and is a child of RoadManager (or, the scene root, if a saved subscene)
Think of this like a slice through a roadway. It defines the characteristics of the road at this point, including: the number of lanes, the direction of each lane, the texture UVs assigned to these lanes, lane width, and more.
This is the actual mesh geometry that is generated between two RoadPoints. It is responsible for interpolating any differences in settings between RoadPoints, such as going from wider to narrower lane widths. Under the hood, a curve object is created to define the way the geometry is added.
This node is not actually exposed to users, and should be treated as an internal mechanism only which holds the responsibility of generating the mesh for itself. It will not appear in the editor outliner as a node, though it is added to the scene.
RoadLanes are light extension of the 3D Path node, giving them a directionality and references to sibling lanes. These may be used for AI lane-following or navigation logic.
RoadLane's are not created by default, and are not required (be aware of a current issue where they may not generated to stick to very curvy roads, see: https://github.com/TheDuckCow/godot-road-generator/issues/46).
RoadLaneAgents are helper classes for vehicles navigating along RoadLanes created by this addon.
Typically added as a child to a RigidBody3D, CharacterBody3D, or other Node3D as a utility to help guide steering along RoadLanes.