I am in the process of developing a game mechanic where a hovering platform alters its color within a certain timeframe before disappearing. I found a method on YouTube that uses a Time node and Sin node within the material to create this effect. I have defined parameters such as “Frequency”, “Intensity”, and “Color”
Then, in the parent blueprints for the Platform, I added a ‘Create Dynamic Material Instance’ node to change the material parameters directly from the blueprint. I use a Timeline for this, which includes two keys, from 0 to 1. The float value gets updated via a lerp node between 0 to 3, after which it’s sent to the ‘Set Scalar Parameter Value’.
However, I am encountering a problem. As can be seen in the video I’ve linked, the color pulsing works well initially. But when the timeline reaches the end, and the ‘Reset Pulse’ event is triggered, the pulsing frequency somehow increases compared to the first cycle. This acceleration continues with each subsequent reset until the frequency becomes significantly fast
Any assistance in resolving this issue would be great!
Is there a way to reset the time node from the Platform blueprint? Or, create my own timer, in my Platform blueprint, that updates a parameter on the material?
You have the time node in the material. Time is always increasing, but for some reason, when we set parameters in the material from a timeline in a blueprint, the time node starts using ‘game time’ rather than ‘material time’.
The solution, is the subtract game time, every time we re-run the timeline, like this
I suspect this strange time node functioning is a bit of a ‘feature’ and may disappear in later versions of the engine. In which case, your original method should be fine…