The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

0 votes

I am working on a top down 2D vision cones system.
I want to use Light2D to draw the cone and then an occluder to restrict the cones. For now the cones are actually circles (100% white circle texture with totally transparent background). I've set the Light2D to cast shadows and it works decently when the shadows are 100% transparent.
Image of the viewzone without shadow color
However in most games like this, the viewcone gets rendered a different color where it is occluded by an obstacle. I wanted to emulate this, by specifying the shadow color. However when I do that, the occluded area is drawn as a square instead of the circle (it's as if the fact that the light texture is a circle with transparent background gets ignored).

Image of the viewzone with shadow color specified
Is there something I can do to make the shadow respect the light's texture? Is this a bug, or am I just using the shadows incorrectly?

Godot version v3.4.2.stable.official [45eaa2daf]
in Engine by (12 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.