The character LightOccluder2D blocked my torch until I set the Cull Mode to clockwise

Another case where I’m glad I continued to watch the video before trying to fix problems. When I first added the LightOccluder2D to the Character scene, it caused my Player to block his own torch light. The full torch light is visible for a fraction of a second when starting the scene, but it immediately changes to look like the image below.


There’s a tiny bit of light just at the front of the player, but no cone of light coming out. Changing the Cull Mode to Clockwise fixes this problem as well as the problem of the generic Character being completely shadowed.

I’m not sure why Yann didn’t have this problem. Out of curiosity, I tried making the occlusion polygon smaller and increasing the torch offset to be completely outside of the character sprite, but those didn’t fix the problem. Only setting the Cull Mode makes the player torch visible.

1 Like

How odd - maybe my torch was just outside the player’s occlusion?

I had this problem even with Cull Mode set to Clockwise. Updating the Torch’s Transform position to 10,0 fixed this for me.

I’ve found the same problem, but also that if you rotate the character in-game (i.e. he follows the mouse pointer), you hit a sweet spot at 12, 3, 6 and 9 o’clock and shadow and occlusion works. Has to be pixel perfect though.

I just set cull mode to counter clockwise and now it works, wait…what? But character not illuminated???

Privacy & Terms