Making 2d lights turn

Could you Please add so the 2d light be able to turn because i really want to make a flashlight

in my games that turns toward the cursor but the problem is the light objects cant turn!

And now you just rotate flashlight blocking object as you please

oh wait yeah that might work i’ll try

its not working for me its just forming a box of light inside the 2 shapes or blockers what ever you want to call them

Did you attached light obstacle behaviour?
So you rotate the object that’s blocking the light.
You can also use a sprite object as the light and change the blend mode

yes i did and it normally it makes a box around it but if you would want me to make 2 sprites facing diagnolly when it would turn to mouse pointer it woul look straight and besaides in pixel art itll look blocky

i guess it works but how can i make 2 peices point diagnal but the middle is still poitnting towards the cursor

I’m not 100 percent sure what you mean. On zeros picture above I’m pretty sure it’s one object with two collision masks and so you turn one object

1 object dosent work it just glows inside the shape of a square for somereason

like this

You might be placing the light inside the collision mask.

no it works but i cant figure out how to group those 2 objects of the same sprite and make them turn towards the cursor

But it is one object
You create some dummy object and now make it light obstacle
Then you change its collision masks
Actually i should update it cause you could do this

Then you just change center position to center position of your light object
And change angle of light blocker to angle of light source

oh wait that might acctually work thanks ill check the collisisions of my objects its just that im a newbie

Thanks you so much it finally worked!

no acctually it really glitches out when it points towards mouse pointer i really need the feature or the light blocker is no where to be seen

Can you show me your events and your light object blocker collision mask?

There are two actions
One to change position
And other which you should use to change CENTER position (just double click your action and choose one with CENTER)
Use it and change it to new sprite CENTER position to NewLight.CenterX() NewLight.CenterY()
Also i don’t see your turn logic

I’ve tried but maybe my newbie brain is just too stupid understand it keeps glitching so i just used sprite masking instead but still thanks for the help!