I am creating a forensics detective game for college and I want to implement a ultraviolet light feature that can reveal hidden materials and items on the walls when you shine a light at it. I was hoping if there was anyone on here that can help me out with hot to set something like this up.
When the light is on you can start doing a trace into the world from the camera or the flash light. If you hit a collision object that has a hidden mesh you can switch it to visible, pretty simple. (Assuming you have a base actor class for hidden objects, you can trace by that type of object). Materials can also be done in a similar way by creating dynamic material instances and changing a parameter on the material when hit by the trace.
Well this is really basic fundamental stuff, so any of the blueprint starter tutorials by epic are a good start. You can find their tutorials on their youtube channel here:
I know it’s a late answer and you’ve probably solved it on your own, but I have a pack on the Unreal MarketPlace that solves this exact thing: Spotlight Reveal in Blueprints - UE Marketplace
In as simple as I can explain it and just as you said it, think of the Spotlight as a cone. I use a cone shaped mask that works just as a cube or sphere shaped mask inside the material for the surface where you’ll be revealing the hidden message. I made the material and function to create this cone mask for my pack.