/Unity-Road-Generator

A Road Generation Tool for Unity using Catmull Rom Splines

Primary LanguageC#MIT LicenseMIT

Unity Road Generator

A Road Generation tool for Unity using Catmul-Rom splines.

Spline implementation was taken and adapted from: https://github.com/nickhall/Unity-Procedural

Includes a Unity port of MIConvexHull, under the MIT License.

Features

Mesh Generation from Spline Points

Road Width, Thickness and Resolution

Edge Generation - Width, Thickness

AI Waypoints

Debug Mode (Gizmos for spline, normals per point, edge gizmos, waypoint visualization)

Images

Generated Road with Spline Gizmo Alt text

Detachable Edges (Separate Mesh) Alt text

AI Waypoints Alt text

Debug Mode - Blue Line is road Path, Red lines are normals to each subpoint (where the road goes), Green lines are edges Alt text

Thickness Alt text

Low Curve Resolution Alt text

Edge Width Alt text

Roadmap

    AI Waypoints - WIP

    Finish Line

Consider buying me a coffee if you like my work (click the image)

Foo