Hey guys, I was wondering how to change a material of an object and later be able to change it back to the original material. I am using a blueprint that allows me to pick physics objects up off of the floor and my final goal is to change the material to a less opaque material while I am holding the object, then simply change the material back to the original when I set the object down. I am having no trouble changing the material the first time, however, I cannot simply set the material back to the original because not all physics objects that I will be picking up have the same original material. Is there a way to possibly overlay a material and revert back to the original after I set the object down, or is there any other way of accomplishing this effect? Thanks.
You can store the initial material in a variable of type Material, then use that variable as input when you want to revert to your original material.
If you want to basically keep using the same material and only change one value, you could also use dynamic materials. These are more complicated to set up but very powerful. You’d probably have to make all your objects’ materials dynamic, so depending on the size of your project this might not be feasible.
If this interests you, check out this tutorial series (particular parts 9 and 10): A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums
1 Like