Driver not updating with movement along path

I have a simple cube moving along path. I set up driver to change color of cube as it moves along path. The driver is not updating as cube moves along path. If i select path, the select cube, driver updates. Can someone tell me why driver will not automatically update as cube moves? Blend file is attached.

Attachments

Path Color Test.blend (143 KB)

You didn’t have a path object for it to follow… You didn’t use the correct property for the driver, but I have put it right for you. Your Follow Path had a red box for the target- this means something is missing.:eyebrowlift:

Just select rendered view and run the animation…

Path Color Test.blend (132 KB)

Cheers, Clock.

Thanks for the info. Now for the real problem, i have several objects moving along the same path, and i would like for them to change color based on their individual position along the curve. To make them move along the curve i added an offset to the follow path constraint, and i don’t know how to handle this in a manner similar to what we did with one object. Blend file attached

Attachments

Path Color Test 4.blend (846 KB)

I am on my way to Australia just now, my will get back to you when I get to Melbourne.

Cheers, Clock

The problem is each object needs it’s own material, otherwise they are all using, and trying to change the same material. And each needs an offset in it’s scripted expression for where it’s at on the curve.

The scripted expression might look a little strange. The parenthesis force an evaluation. (var>0.5) will return True(1) or False(0) depending on whether or not var is greater than 0.5. So…

var+0.25-(var>0.75)

That way it will subtract 1(True) if var+0.25 is greater than 1.

Attachments

Path_Color_Test_4-SkpFX.blend (856 KB)