i recently played around with motion pathes and found them to be really useful for moving around my objects.
at the same time they move around i’d like them to change the color accordingly.
this page: panda3d.org/reference/python … thInterval somewhat suggests there might be a possibility to toss the values from a mopath into a function. which would be exactly what i need.
is this possible? is there something compareable?
thx for hints/ideas/sollutions
You could write your own custom version of MopathInterval (it’s a very simple Python class) that does whatever fancy behavior you like.
Or, you could use a LerpFunctionInterval to do the same thing.
well i hoped some ready to use and nice interval would be around. if it boils down to python code anyway i’ll come up with something. btw. i simply have to compliment panda on the sequence and interval system. it’s totaly awsome no matter how often i use it. thx for your reply. continues to code
So you want to change the colour of the object that moves along a mopath?
Wouldn’t using a mopath interval inside a parallel, color scale intervals and few Wait() inside a parallel and these parallels inside a Sequence work?
Note that there used to be a bug in the chicken exporter/panda3d and the exported shape was ‘a smoothed version of the control object instead of the real nurbs curve shape’.
discourse.panda3d.org/viewtopic … &start=450
read from the 22th post.
You can see what I mean from the gif animation.
i’m not using the exporter, my mopath are created during runtime. lerping just between two colors would be very easy, but in my case it follows a very complex pattern where i’d end up with literally several thousand color lerps in one sequenceand i’m a bit afraid of losing syncronisation.
as for now i’ll just save my values in a list and look them up, other idea would be to use a dummynodepath with motion interval and poll it’s positino each frame and then use the result in whatever function i want.