TheDuckCow / godot-road-generator

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

RoadSegments don't smoothly interpolate Z-axis rotation #2

Closed TheDuckCow closed 1 year ago

TheDuckCow commented 1 year ago

Currently, we have smooth interpolation from one RoadPoint to the next in terms of some lane/overall width. However, rotation about the Z axis of RoadPoints is not smoothly interpolating across a RoadSegment, per image below:

Screen Shot 2022-10-16 at 12 05 25 AM

A bonus change would be to have the rotation be somehow influenced by the length of the gizmo handle (so if the handle is shorter, it will get to the 'middle point' rotation level sooner, being the halfway point between the rotation values at both ends of the road segment.

TheDuckCow commented 1 year ago

FYI @bdog2112 I've assigned this to you since this is the highest near-term value add change to improve. If it looks too lofty to work on, you could still work on one of the other lower hanging fruit bugs instead. Either way, happy to triage tomorrow and peer program a bit if you like.

Edit: If you've not read this page yet already, I do highly recommend it.

TheDuckCow commented 1 year ago

Appears to be the issue of using a distance magnitude instead of radians (???) for the curve tilt assignment, should actually calc the radians about the z-basis axis of the roadpoint wrt the given end curve3d point.