How to make a flashlight without using lights godot?

Godot Version



Im making a mobile game and the flashlight slows it down. Is there a way I can have the walls have two textures (dark and lit texture) and then reveal the lit one when i point a flashlight at it? (3D btw) I really need to find a way to have my walls be unshaded.

A way to do this is kind of a hack but you could theoretically use shaders. You’d have to really be experienced in that field however, as doing this is no easy task due to the fact you have to check where the walls are and how you’re going to project the light onto them.

I suppose the easiest way to do this would be using a raycast. When the raycast from the player hits the wall, and their “flashlight” is turned on, you can switch to the light version of the texture. Or even more efficient, if the flashlight is off, don’t even check the raycast at all, only after the flashlight got toggled. Sorry if I misunderstood the question.

1 Like

No you understood it perfectly thank you both for responding. I might try to implement these and share it if it works.