I'm trying to get my lighting to clip around objects like this.
In my game, things cannot move if they have light on them.
The idea is that when the lighting "breaks" around a solid object, or another enemy, whatever is behind it will be able to move, now that it is in the "shadow" (just some area with no light) of something else.
Also, for it to work even better, can you make your LOS a cone that only reaches so far?
Thank you so much!
Wouldn't using obstacles within line of sight do what you want?
Yeah, but I want that LOS to be visible by flashlight
Edit: So if the LOS breaks, the flashlight's light does too, around the object.
And the Shadow Light object isn't good enough?
Can I use that to create lighting that will only illuminate parts of the level the flashlight light hits?
Look at the examples shipped with C2..
New project - shadow light..
I'll check it out when I'm home. Thank you!
Can't seem to get it to do what I need. How would I set it so my flashlight light will cut around anything that it hits?
What do you mean by cut around?
Did you look at the examples?
Develop games in your browser. Powerful, performant & highly capable.
Yeah, I was able to get some of it working. The part I cannot figure out, is how to make the flashlight light break off like I half a**ed drew, whenever it hits an obstacle.
The light will also break around enemies.
That would essentially be my way of showing what the LOS is.
Are you using the shadow-light object and giving the walls the shadowcaster behaviour?
I'm trying that now, however, the texture of the wall turns black whenever I use the shadowlight.
Send the shadowlight object to the bottom of the layer - z-order