Community Tutorial: Follow a Spline and Report Distance Along It Using an Actor Component

Thanks for the kind words!

It’s true that I didn’t test the driving direction in extreme conditions. I built it assuming that the left and right steering controls would eventually guide it to the right spot, so I’m not sure what your terrain looks like if it’s “rotated around x-axis”. It’s totally possible that my math for finding the steering direction doesn’t work right if the world is closer to being upside down.

Any waviness that I saw, like quickly steering left and right, could be fixed by adjusting the Forward Aim Location. The farther in front of the object you put that focus point, the softer the steering and transitions will be, which should reduce the wiggles. You might also consider adjusting the turning radius and friction of your wheels, which will also affect the turning speed. Make sure you turn on the debug visuals to help figure it out.

In my “Proceed to Destination” function I do have a “Map Ranged Clamped Node” for converting the rotation angle of the destination into the 0-1 steering range. I clamped it at 120 degrees. You could play with that value as well.

1 Like