I am trying to set up a system where an actor becomes translucent when selected in “move mode”, then is restored to the previous state when the move is completed.
I have figured out how to get the actor and tell it to “go translucent” (happens in C++). The base blueprint that handles all the “thingys” in the game then walks it’s component tree, grabs the meshes, and gets/sets the material and changes everything to a translucent material. The problem is that restoring the original materials is not so clean since the Actor is composed of multiple sub parts and I need to restore them all to potentially different materials. And physics materials are in play as well (not sure if setting a material clears the physics material or not). I thought about writing the materials to an array, but can’t guarantee the order, etc… Is there a general approach that is used for this sort of thing? Am I coming at this the wrong way? I’d be happy taking the existing material and making it transparent, but it is not a Translucent material.
It’s a pretty common thing in games to make something see through while placing and then pop them solid when finished - that’s all I am trying to do.
Currently I am doing this in a blueprint as they seem to be easier to get to the component tree, but I can push it down into the base C++ class if that is easier. This is handled in a base blueprint so it handles this for all the derived objects (works fine for highlighting, etc.). It’s just the materials caching that is getting me stuck.
If it matters, the hierarchy is:
ThingyBluePrint->BaseThingyBlueprint->BaseThingyC++ → AActor → …Turtles here on out…
Any help would be appreciated,