Can actor react to light?
I want to know if it's possible to make an actor react to the lighting, meaning if light shines on my actor, it will activate a pointlight inside my actor or something of that nature. If anyone knows if it can be done within blueprints, I would like to know.
asked Nov 05 '15 at 11:28 AM in Using UE4
You can do this with line tracing, I done something that will suit you, but I can't endup with one linetrace because if I check "ignore self" linetrace not overlap with objects on level but only with player, you can fix this if add another linetrace for all objects except of player.
You need to create blueprint that you want to represent you light (add light as component, I call this blueprint BP_LightTrace) and place somewhere, then create 2 var in you character blueprint - LightTraceArr array of type BP_LightTrace ( bp that represent you light ) and LightTraceFArr array of type float, then see my node setup. LightTrace event just plugged to EventTick. This very basic setup, instead of printing min float that represents closest BP with point light you can drive material collection parameter in you custom dynamic shader, for example you can drive color modulation of you shader as you mention before. There a lot of tuts how you can do it.
answered Nov 05 '15 at 04:10 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here