Pause time inside a material?

Is there an easy way to pause time inside of a material? I know it will pause if the game is paused, however, I am trying to pause a material during gameplay.

I’m currently doing small stuff like the picture below, which ends up affecting a heightmap. I want to be able to pause time and unpause it.

That’s slightly outside of the scope of rendering alone; you’d need to involve some blueprint scripting to achieve your aim. For example, you could have a scalar parameter in your material instead of the time node that is constantly set to the current time via either a dynamic material instance or a parameter collection and then just stop updating it when you want to freeze the material.

Yes, I figured so. But I’m not sure how I’d modify the material code I have that when I (for example) multiple time by 0, I retain the same value that goes into sine so I get the same output thats used to affect the heightmap.

You’d have to pass ‘Time’ in from Blueprint. It’s essentially a counting clock.

Ahhhh, didn’t think of this. I’ll try that out. Thanks!