TheDuckCow / godot-road-generator

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

Non-continuous edge curve tilts #161

Open TheDuckCow opened 3 months ago

TheDuckCow commented 3 months ago

We recently implemented https://github.com/TheDuckCow/godot-road-generator/issues/135 which nicely generates additional curves on the edges (and center) of the road. This is useful for CSG or other procedural placement efforts, but this also revealed some issues: The ending tilts of these generate curves are not continuous when compared to neighboring road segments (noting that a set of curves currently is generated once per road segment).

See the example below, where the RoadPoint on the right has been tilted

comparison
TheDuckCow commented 3 months ago

This was a known issue when we merged the curve generating code, we decided to tackle this in a followup. The main way to avoid this in the meantime is to not tilt roadpoints on axes other than Y. There should not be any continuous curve problems for elevation changes though.

TheDuckCow commented 3 months ago

On a little bit of searching, it comes down to this issue: https://github.com/godotengine/godot/issues/65634 https://github.com/godotengine/godot/pull/79355

So, there's really not much we can do about this in versions of Godot where it's a problem. We might still not be applying the correct tilt, but it wouldn't be reflected in the CSG follow path nodes anyways. Still, leaving this as an open item so we can review once updated engine builds are out.