Hi!
I'm trying to make a ceiling light work as expected in a 2D adventure game, but I can't. This question would apply to platformers and the like, as long as it's "shot along the Z axis".
My approach so far has been to have a Light2D
with a cone-shaped light texture and adding a small LightOccluder2D
at the player's feet.
Whenever I run that, two things happen. First the fan on my computer sounds like it's about to go airborne, and second the shadow is ridiculously (infinitely?) long no matter what settings I tweak. The Light2D
also lights up the entire room outside the cone-shaped texture and the LightOccluder2D
casts this crazy shadow outside of it as well.
I found a tutorial for Unity3D which pretty much describes what I'm going for: a combination of normal maps and lights. We're using Spine for animations, so let's put that aside for now and focus on the lighting, because it seems impossible to do normal maps on Spine nodes (link to relevant part of the video).
This part of the video is what I'm looking for. How do I achieve a directed spot light?
If I should use LightOccluder2D
to create a shadow, exactly which combination of settings makes the shadow not ridiculously long? Or if I'm barking up the wrong tree, could you tell me what to use for the shadows?
I'm tagging this shader
as well, in case I need to use Godot's shader language - which I'm completely unfamiliar with - to do this.
Thanks everyone and I'll be happy to give more information if needed! Just hoping I don't have to switch back to Unity over this.