Hello. This tutorial is made for Godot 3.x it seems and doesn't work in Godot 4. How would I achieve the same effect in the latest stable version?
https://www.gdquest.com/tutorial/godot/2d/limiting-vision-with-lights/
4 messages · Page 1 of 1 (latest)
Hello. This tutorial is made for Godot 3.x it seems and doesn't work in Godot 4. How would I achieve the same effect in the latest stable version?
https://www.gdquest.com/tutorial/godot/2d/limiting-vision-with-lights/
There's no "mask" mode for Light2D's in Godot 4 and using sprite's canvas item material's light mode to "light only" doesn't render the sprite even if there's light on it
Seems like in 4.0, you need to use dedicated masking nodes: https://godotforums.org/d/33826-where-is-the-mask-mode-for-light2ds-in-godot-4
Also here's specifics in the documentation: https://docs.godotengine.org/en/stable/classes/class_light2d.html
The official Godot community forums
Inherits: Node2D< CanvasItem< Node< Object Inherited By: DirectionalLight2D, PointLight2D Casts light in a 2D environment. Description: Casts light in a 2D environment. A light is defined as a colo...
Seems like it's not as straight forward, I have a PointLight2D as sibling of a CanvasGroup with clip only children, and a Sprite2D as the group's child with light only light mode
But it's not rendering the sprite. I looked up a few reddit posts on 2D FoV demos but none explain how they achieved it