How to change color over time?

Hello there. Here´s myy problem:
I want to fade the color of the cube´s material into blue over a certain time when it is falling into the triggerzone.

At the moment it´s changing the color instantly and not over the Timeline-Length (5 sec)…

I hope somebody can help :wink:

Edit:okay here´s the timeline with it´s Color Track…

I don’t think that’s true. The New Time field is used for jumping to a specific time: Timelines | Unreal Engine Documentation

Again, I’ve not really used Timelines myself but your blueprint looks OK (similar to examples given by Unreal), so I’d suspect the timeline itself might be to blame.

Never actually used Timeline node, but from appearence i guess you need to specify those 5 seconds in the new time field. It’s 0.0 currently, so it does color change instantly.

Can you show us the Timeline’s curve as well please?

Yeah that´s what I was thinking too…when you look at the Blueprint while simulating, you can see that it should work, but the cube is not fading his color over the Time-Length, more like in the first frame :frowning:

You should set a color key at the first frame as well. Currently you have keys for alpha of the color in the first and the last frames, but not color.

OMG!! Thank you man :smiley:
I can´t believe this…I will never make this fault again :wink:

Another way to change between 2 colors (or textures) is to create a linear interpolate node and animate the alpha. In order to switch from Material1 to Material2 and back (0.0 to 1.0 to 0.0 ). The Set Vector parameter value node (from the Create dynamic Material Instance), needs to be a ‘set scalar parameter value’ however that can take a float value. And the timeline needs to be a 0 value and a 1 value over 2 seconds for example.