how do I reveal hidden message when spotlight cone goes over it?
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.
asked Nov 03 '18 at 05:54 PM in Using UE4
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.
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: https://www.unrealengine.com/marketplace/en-US/slug/spotlight-reveal
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.
answered May 16 '19 at 06:38 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here