12-04-2025, 01:03 AM
Hello!
I'm building a puzzle game where the user can place prefabs of track pieces, which each have smaller splines that connect together at runtime. When the spline directions are aligned (last point connects to first point of next piece) the transition works smoothly, but issues arise when the two splines are in opposite directions (last point connects to last point, or first to first) below:
When my controller drives forward into the end of the first piece, it flips and stops moving (Clamping is active) as it is now trying to drive forward into the connection it just used, needing it to reverse to continue in the same direction as it was. The same happens when reversing back through. How would I be able to ensure that the controller smoothly transitions over to the new track piece in the same direction regardless of the direction/rotation of the next track?
I'm building a puzzle game where the user can place prefabs of track pieces, which each have smaller splines that connect together at runtime. When the spline directions are aligned (last point connects to first point of next piece) the transition works smoothly, but issues arise when the two splines are in opposite directions (last point connects to last point, or first to first) below:
When my controller drives forward into the end of the first piece, it flips and stops moving (Clamping is active) as it is now trying to drive forward into the connection it just used, needing it to reverse to continue in the same direction as it was. The same happens when reversing back through. How would I be able to ensure that the controller smoothly transitions over to the new track piece in the same direction regardless of the direction/rotation of the next track?

