Actor moving along spline changes speed when it hits a different spline point. This is driving me nuts- please help!

Video: Unreal Engine - inconsistent actor movement speed along spline - YouTube

Blueprint - method 1: Move actor along spline posted by anonymous | blueprintUE | PasteBin For Unreal Engine

Blueprint - method 2: Move actor along spline - timeline method posted by anonymous | blueprintUE | PasteBin For Unreal Engine

Using UE5. I am procedurally generating spline points for a train track and trying to move an object along that track. For some reason, the actor’s movement speed seems to change at two points:

  1. At the spline point immediately after a curve

  2. A ‘jump’ forward on the second spline point after a curve

It also may speed up during the curve? It’s hard to tell.

I can’t figure this out and it’s driving me nuts. I’ve tried both the distance and timeline methods of movement and both have the exact same behavior. I can’t think the manner of how I’m generating the spline points would make a difference in this because the movement is based on the length of the spline.

Any ideas? I’m open to literally anything at this point, I have spent too much time on this.

I found a way around this and wanted to document it for any future readers.

So I couldn’t directly solve this issue. I think it has something to do with how unreal engine determines the lengths of spline curves/sections.

What I wound up doing was traversing the procedurally generated spline and dropping a new spline point into a different spline after a certain distance. This new spline was then basically a higher resolution replica in which every segment is approximately the same length. There is no noticeable speed changes when moving an actor along it.

In case it might help, try this for constant speed along spline:


AlongSpline

1 Like

Example of Spline Duration + Constant Velocity - it’s just a tickbox:

1 Like