TheDuckCow / godot-road-generator

A godot plugin for creating 3D highways and streets.
MIT License
313 stars 16 forks source link

LaneSegment debug drawing has poor performance #102

Open TheDuckCow opened 1 year ago

TheDuckCow commented 1 year ago

Right now we are using immediate geometry to draw the sawtooth fins (see screenshot below), but this class is really made more for drawing of small bits of geometry that might change every frame. Drawing the sawtooth fins across all roads leads to slow in game and in editor performance, to the point of not being useful.

Let's switch to another more persistent geometry type (since, if there are transform updates, we'd need to update the LaneSegment points these draw along anyways, so we already have an update hook).

Screen Shot 2023-06-17 at 6 55 26 PM