# How to make a "light" follow a character in a dark level? (Uncategorized artifact)

**URL:** <https://community.flowlab.io/t/how-to-make-a-light-follow-a-character-in-a-dark-level-uncategorized-artifact/29084>\
**Category:** Uncategorized\
**Created:** [December 18, 2020, 2:36pm UTC](https://community.flowlab.io/t/how-to-make-a-light-follow-a-character-in-a-dark-level-uncategorized-artifact/29084 "2020-12-18T14:36:39Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrVargas](https://community.flowlab.io/user_avatar/community.flowlab.io/mrvargas/32/63694_2.png) [@MrVargas](https://community.flowlab.io/u/MrVargas)\
**Post date:** [December 18, 2020, 2:36pm UTC](https://community.flowlab.io/t/how-to-make-a-light-follow-a-character-in-a-dark-level-uncategorized-artifact/29084/1 "2020-12-18T14:36:40Z")

</div>

I’m a teacher and one of my students wants to make a top-down game where the main character is in a cave and the cave will be dark, but the character is holding a torch and when they move an illuminated radius follows the character.

---

<div class="post-metadata">

**Author:** ![JR01](https://community.flowlab.io/user_avatar/community.flowlab.io/jr01/32/71701_2.png) [@JR01](https://community.flowlab.io/u/JR01)\
**Post date:** [December 18, 2020, 2:46pm UTC](https://community.flowlab.io/t/how-to-make-a-light-follow-a-character-in-a-dark-level-uncategorized-artifact/29084/2 "2020-12-18T14:46:45Z")

</div>

Hi @MrVargas,  
I suggest adding darkness to the objects that are farther away from the player by using the colors behavior.

I have an example that shows how to do this:  
[https://flowlab.io/game/play/1505963](https://flowlab.io/game/play/1505963)

---

<div class="post-metadata">

**Author:** ![grazer](https://community.flowlab.io/user_avatar/community.flowlab.io/grazer/32/71648_2.png) [@grazer](https://community.flowlab.io/u/grazer)\
**Post date:** [December 18, 2020, 7:35pm UTC](https://community.flowlab.io/t/how-to-make-a-light-follow-a-character-in-a-dark-level-uncategorized-artifact/29084/3 "2020-12-18T19:35:52Z")

</div>

@MrVargas - Another approach that isn’t nearly as flexible & nice, but probably simpler to implement is to cover the screen with a large “darkness” object that has a hole in it representing the “light”. Just scale the darkness object up and position it over the player, like this:

> **[Flowlab.io - Simple Lighting](https://flowlab.io/game/play/1566450)**
>
> Built with flowlab.io

---

<div class="post-metadata">

**Author:** ![Seth01Master](https://community.flowlab.io/user_avatar/community.flowlab.io/seth01master/32/21129_2.png) [@Seth01Master](https://community.flowlab.io/u/Seth01Master)\
**Post date:** [December 18, 2020, 7:42pm UTC](https://community.flowlab.io/t/how-to-make-a-light-follow-a-character-in-a-dark-level-uncategorized-artifact/29084/4 "2020-12-18T19:42:31Z")

</div>

You could add a sprite (a very big one) that has a hole in the center of it, and attach it to the player.

---

<div class="post-metadata">

**Author:** ![Zethron\_Officials](https://community.flowlab.io/user_avatar/community.flowlab.io/zethron_officials/32/45666_2.png) [@Zethron\_Officials](https://community.flowlab.io/u/Zethron_Officials)\
**Post date:** [December 5, 2022, 5:14am UTC](https://community.flowlab.io/t/how-to-make-a-light-follow-a-character-in-a-dark-level-uncategorized-artifact/29084/5 "2022-12-05T05:14:27Z")

</div>

Mr. Grazer I making a top down game with darkness effect. I saw the example you sent and it work out well. Next level I added a camera behavior and the darkness effect isn’t following the player anymore. Can you help me?

---

<div class="post-metadata">

**Author:** ![Pixel\_Name1](https://community.flowlab.io/user_avatar/community.flowlab.io/pixel_name1/32/71277_2.png) [@Pixel\_Name1](https://community.flowlab.io/u/Pixel_Name1)\
**Post date:** [December 5, 2022, 3:24pm UTC](https://community.flowlab.io/t/how-to-make-a-light-follow-a-character-in-a-dark-level-uncategorized-artifact/29084/6 "2022-12-05T15:24:06Z")

</div>

Please don’t revive old topics create your own. But did you spawn the light object in the UI layer?

---

<div class="post-metadata">

**Author:** ![Zethron\_Officials](https://community.flowlab.io/user_avatar/community.flowlab.io/zethron_officials/32/45666_2.png) [@Zethron\_Officials](https://community.flowlab.io/u/Zethron_Officials)\
**Post date:** [December 6, 2022, 12:45am UTC](https://community.flowlab.io/t/how-to-make-a-light-follow-a-character-in-a-dark-level-uncategorized-artifact/29084/7 "2022-12-06T00:45:44Z")

</div>

Not yet. I’m kind of new to flowlab.

---

<div class="post-metadata">

**Author:** ![Pixel\_Name1](https://community.flowlab.io/user_avatar/community.flowlab.io/pixel_name1/32/71277_2.png) [@Pixel\_Name1](https://community.flowlab.io/u/Pixel_Name1)\
**Post date:** [December 6, 2022, 12:46am UTC](https://community.flowlab.io/t/how-to-make-a-light-follow-a-character-in-a-dark-level-uncategorized-artifact/29084/8 "2022-12-06T00:46:23Z")

</div>

Yup that’s your issue then lol

---

<div class="post-metadata">

**Author:** ![Pixel\_Name1](https://community.flowlab.io/user_avatar/community.flowlab.io/pixel_name1/32/71277_2.png) [@Pixel\_Name1](https://community.flowlab.io/u/Pixel_Name1)\
**Post date:** [December 6, 2022, 12:46am UTC](https://community.flowlab.io/t/how-to-make-a-light-follow-a-character-in-a-dark-level-uncategorized-artifact/29084/9 "2022-12-06T00:46:47Z")

</div>

I mean not spawning in your light object

---

<div class="post-metadata">

**Author:** ![Zethron\_Officials](https://community.flowlab.io/user_avatar/community.flowlab.io/zethron_officials/32/45666_2.png) [@Zethron\_Officials](https://community.flowlab.io/u/Zethron_Officials)\
**Post date:** [December 6, 2022, 12:47am UTC](https://community.flowlab.io/t/how-to-make-a-light-follow-a-character-in-a-dark-level-uncategorized-artifact/29084/10 "2022-12-06T00:47:37Z")

</div>

Im just gonna ask my friends.

---

<div class="post-metadata">

**Author:** ![Pixel\_Name1](https://community.flowlab.io/user_avatar/community.flowlab.io/pixel_name1/32/71277_2.png) [@Pixel\_Name1](https://community.flowlab.io/u/Pixel_Name1)\
**Post date:** [December 6, 2022, 12:48am UTC](https://community.flowlab.io/t/how-to-make-a-light-follow-a-character-in-a-dark-level-uncategorized-artifact/29084/11 "2022-12-06T00:48:19Z")

</div>

Wha- ok that’s fine…
