How to make light that follows the character?

Hello, I am trying to make it so my character is in a dark level and only around them they can see. But the x and y must be off because the darkness keeps going ahead of my character. Does anyone know how to fix this?

Here is my game, darkness is on the third level

1 Like

Have you tried using the attack behavior?

EDIT -
Nevermind, it is in the user behavior. I will show you in a second…

1 Like

I think that the camera is messing it up. When the screen (Darkness) Moves, the camera moves it as well, throwing it off

Yes, I took out the camera, and it works fine. Not quite sure on what to do yet. :frowning:

I think, the best solution (or the easiest) Is simpy just put it in the game layer, with a high display order. You can use an attacher too.

Here’s an example from the help page:

1 Like

I tried that, and put a camera in it… but it didn’t work.

The darkness wasn’t there, not sure how to help if I can’t see it…

Putting the darkness into the game layer made it work! I just kept all the same coding I had before as well, no attacher needed. Thank you for your help!

2 Likes