I have some destructable rocks…but once they explode the chunks are everywhere and quite a handful…I can destroy actor after a delay in blueprint but that’s sloppy…
Is there a way I could them out over time? Or could someone recommend me a clean way to achieve what I’m looking for?
Does anyone have maybe a plan for me that will at least make it decently clean? In stead of just destroying actor after a delay and watching all of the chunks just disappear?
Oh wow…using opacity as a parameter. …That’s genius!!
Could possibly explain to me in.more details what you’ve done here?? This is an excellent idea! Thank you!!
Maybe you could fade out the material opacity over time like I did with my footprint decals? These start fading out as soon as they’re spawned and fade out over 59 seconds before getting destroyed at the 60th second when they’re invisible. I create a dynamic material instance and set the SpawnTime from the character blueprint when they’re spawned. Perhaps some kind of similar thing would be possible with the chunks. (I think there’s some optional bits in my blueprint.)
Basically, you want how long the item has existed so you subtract your spawntime from the gametime. Then multiply that by 1 divided with time you want to get to maximum opacity. Then because I want it to fade out and not in, I divide 1 with that result to reverse the process. And because I want to be sure it completely fades out before it gets destroyed, I use 1 second less than the decal life time and subtract 1 in the end so it gets to 0 opacity before the time ends. And the add(25) to the time just changes the starting opacity by a little because I want it to be semi transparent when it spawns.
I went mostly by this other question/answer here: [Request] material instance time varying? - Asset Creation - Unreal Engine Forums
I greatly appreciate you. This will help a bunch.
I just found this. I can’t wait to try it! Thanks Bohrium + AttemptD!
Hey, great solution! However I dont understand why you
divide 1 with that result to reverse the process
Shouldn’t you subtract the value from 1? e.g. 1 - 1/5 = 4/5?
Just leaving this here just in case someone else stumbles accross this same problem.
Anyway, thanks a lot