Location of Object on path Constraint?

How would i get the location of an object on a path or, even better, how far it has travelled on the path?



I just asked this same question, in a little different way yesterday.


I am more intested in getting how far along a curve an object has traveled and if the object has reached the end of an open curve.

The getLocation will give me the XYZ of an object constrained to a curve, but does not tell me if the object is before or after the endpoints of the curve.

Atom if you don’t need to know how long the curve is and can work on percentages then you could use the curves speed ipo the know how far the object is along the path.

Ideasman42 those won’t be work for what i want to do, i really need the distance travelled. Thanks anyway.

Also while i’m here could someone tell me how to rotate an object around its local z axis through python?



How can I use the speed curve to get the percentage I have traveled along a path?

Do you have an example?


Here is how you can rotate an object using python code:

How do i rotate in its localspace?

Maybe this helps: