Dynamically Update Lighting Channels

Hey guys, I added a hook into my base sprite actor in order to update the lighting channels during runtime. My goal is to be able to have a sprite be lit or unlit by a spotlight depending on the location of the light. Because it’s all in 2d, using the lighting channels seemed like the perfect solution. After figuring out that you can’t update the channel in blueprints during runtime I wrote a simple function to do it in cpp. Although the value is in fact properly updated, it seems to have no effect on the light actually shining on the object. I haven’t been able to do any testing where I destroy and rebuild the light or object with new parameters but I did try invalidating the lighting cache and that didn’t seem to work. Any help or a point in the right direction would be very appreciated. Thanks!

@DreamInObsidian did you ever make any progress on this? I’m trying to do the same thing.