I ve been trying to set a flashlight for my top-down game to be rotatable. Ive tried adding light texture but it doesnt rotate
You use light obstacles (an object with LightObstacleBehavior behaviour) around the light source to prevent the light being emitted all around. The collision mask determines where the light is blocked.
For example, this light blocker has 2 triangular collision masks (a big one on the bottom left and a small one at the middle top):
and a point to position the light:
And when the light source is placed just inside the “V” made of the green shape, it causes the following:
wouldnt that interfere with other lights in the game, creating weird shadows on the character?
Possibly, but you were after how to create a flashlight, and this is a solution.
an alternative - If you don’t want it to interfere with other lights you can use a multitude of objects with blend mode 1 and raycast from source against the obstacle group and use the distance between the points to set the width of the objects.

Id posted this in the wrong thread b4- lol



