Skip to content

Class: RoadManager

Patrick W. Crawford edited this page Oct 3, 2024 · 3 revisions

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.

roadmanager editor

Usage

This should be use as the parent of all RoadContainers in the scene. RoadContainers do not need to be direct children, or direct siblings of each other, but they should all have one RoadManager parent. This is to ensure there are defined values for the settings below, which are intended to be scene-wide.

All RoadLaneAgents should also be children of a RoadManager in order for auto lane assignments to work properly.

In the future, RoadManagers will have additional functionality too, such as calculating routes and paths across the entire network of roads.

Settings

Script Variables

  • auto_refresh: If enabled, auto update road meshes in the viewport, including during transforms. For most use cases, you will want to leave this on. Disabling this can be useful when generating procedural roads during game runtime, in order to have more control over when geometry should be refreshed or updated.
  • density: Determines the distance in meters between loopcuts of a RoadSegment mesh. A lower number means a higher poly mesh and smoother curves. See bake_internal described here.

Current support: Godot 3.5+ Godot 4 planned for v1.0 of this addon (details)

Wiki pages

Clone this wiki locally