Animate object along curve with constant speed, independent to curve length. How?

Hi there,
for a project I need to animate an objects along a path/curve with a constant speed, nomatter the paths length.
When using a Follow Path Constraint on the object and animating its Offset value, the speed and position are changing, when the path is edited/shortened/lenghtened.

I tried messing around with drivers by following these two suggestions. They both sound like a logical solution. Unfortunatelly I am not able to reproduce their solutions, as I do not understand enough about drivers and data paths.
1: https://blender.community/c/rightclickselect/Xrym/?sorting=hot
2: Get Spline lenght with RNA: Spline.calc_length() utility function - #3 by banana

A simple step-by-step-guide to get the desired effct would be very welcome.
Thank you :kissing_heart:

1 Like

You could use GN, or traditional modifiers. Here’s how with traditional modifiers:

Make a vertex. Give it a curve modifier targeting the curve. With default, X-axis deformation, move it in the X axis (transform should be same as curve object; you can put additional X axis translation onto this transform, or you can deform, doesn’t matter.) Linear motion in X axis translates into linear motion along curve’s length.

To get the position of this vertex onto some object, assign it a vertex group and the use a copy location constraint on some other object, designating the vertex group.

I’m sure there’s a driver solution too, but just doing it with a vertex and a modifier sounds easier to me.

Thanks, bandages, for you detailes answer. I managed to get it to work with modifiers. Unfortunatelly the rotation of the vert/the object sticked to it, does not follow the curve. At least in my setup. Is there a way to get the objects follow the curve’s rotation/heading? Or should this be possible with your described setup yet and I am doing something wrong? I really need the object following the curve’s position AND heading. I’m sorry, I could have been more precise on that in my initial post.
Thanks again

Make another vertex in the same object, moved slightly in +X (maybe just 0.001), mark it by assignment to a new vertex group. Damped track that vertex group. Make another vertex in the same object, moved slightly in +Y, mark it with a new VG as well. Locked track that VG. This will get you inheriting both heading and tilt from the curve.

Thanks, I just tried that. But how do I Damped track that +X VG and how to Locked track that +Y VG. The two constraints do not offer a selection for VGs :confused:
I am surely missing something. Sorry for being so uneducated.

Okay, I am recalling my previous post. I wrongly tried to assign the constraints to the vertices-object, not to the to-be-moved/rotated-object. When adding them to the object, I can choose the +X and +Y VGs from the vertices-object in the constriants and position+heading are working now.
Thank you soo much.
Hugs!

1 Like

And in addition, for all the people stumbeling across this post in the future:
Here is a helpful tutorial I’ve found, which lines out the workflow for the same effect using Geometry Nodes: https://www.youtube.com/watch?v=o0Q0KqvXlDg
Just use the ā€œLengthā€ option in the ā€œSample Curveā€ Node to get a curve length independent position control. You can then dial in meters as travel distance on path.

2 Likes