I am coding in C++, but this question may be general to materials.
I’ve created a ring pulse emissive material (taken from YouTube), that does not use any texture. It just scales a small ring outwards to create the effect, all done in the material editor. So far so good.
I copied the Plane static mesh, that comes in the basic shapes folder of UE4, and renamed it for my game. In the mesh, I set the material to my ring pulse. Ok now I can drag the mesh into the viewport and it appears great, with my red ring pulsating nicely, over and over again.
Now, in my game I use an instanced static mesh component, attached to the root component of an actor, to render many ring pulses. This works fine. Or, I can just have an lone actor to spawn the mesh, then I spawn many of these mesh actors. Either way works.
Trouble is, the pulse effect on each mesh (seen on the screen) seems to start from where it left off. On one mesh it may be correct and start from small and pulsate to large and on another mesh it may render as already big and pulsate a bit outwards then start again from small.
I think may be when UE4 loads the material at the start of play, it is continuously pulsating in memory, and whenever it is rendered, it just appears, “as is”, at that particular moment in time.
What I need, is someway of saying to the mesh (or better, the material), please “reset” when rendering and start over from the beginning.
Can this be done in the code (I can access the mesh and the material in C++) or is there some setting on the mesh or material I can change? Or, do I need to add something to the blueprint code in the material editor?
Thanks in advance,