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.
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:
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
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.