# Raycasting bug

**URL:** <https://forum.makecode.com/t/raycasting-bug/37232>\
**Category:** Help\
**Created:** [June 10, 2025, 5:01pm UTC](https://forum.makecode.com/t/raycasting-bug/37232 "2025-06-10T17:01:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![BioShrimpCoding](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/bioshrimpcoding/32/13238_2.png) [@BioShrimpCoding](https://forum.makecode.com/u/BioShrimpCoding)\
**Post date:** [June 10, 2025, 5:01pm UTC](https://forum.makecode.com/t/raycasting-bug/37232/1 "2025-06-10T17:01:04Z")

</div>

@richard So I’m trying to make a game where you’re in a 3d world made from (Raycasting). I’m using  
pxtt-Lantern, but the lantern breaks and does not do what I want it to. I just want it to do some fog effect around the player, making visibility harder, and not being able to see across a simple area that I choose, is there any way I could do that??? [https://github.com/felixtsu/pxt-lantern](https://github.com/felixtsu/pxt-lantern)

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [June 10, 2025, 5:40pm UTC](https://forum.makecode.com/t/raycasting-bug/37232/2 "2025-06-10T17:40:47Z")

</div>

@BioShrimpCoding i don’t think those extensions are compatible with each other

---

<div class="post-metadata">

**Author:** ![Seal\_dev](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/seal_dev/32/33723_2.png) [@Seal\_dev](https://forum.makecode.com/u/Seal_dev)\
**Post date:** [June 11, 2025, 2:28am UTC](https://forum.makecode.com/t/raycasting-bug/37232/3 "2025-06-11T02:28:56Z")

</div>

pxtt-Lantern only displays 2d

---

<div class="post-metadata">

**Author:** ![florp](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/florp/32/22367_2.png) [@florp](https://forum.makecode.com/u/florp)\
**Post date:** [June 11, 2025, 2:34am UTC](https://forum.makecode.com/t/raycasting-bug/37232/4 "2025-06-11T02:34:30Z")

</div>

i think you would have to manually do it. like add a sprite around you and make it so it moves with you or something.

---

<div class="post-metadata">

**Author:** ![Longlinh](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/longlinh/32/6525_2.png) [@Longlinh](https://forum.makecode.com/u/Longlinh)\
**Post date:** [June 11, 2025, 2:47am UTC](https://forum.makecode.com/t/raycasting-bug/37232/5 "2025-06-11T02:47:28Z")

</div>

I use Lantern in Raycasting for a flashlight.  
It’s actually pretty good !

---

<div class="post-metadata">

**Author:** ![BioShrimpCoding](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/bioshrimpcoding/32/13238_2.png) [@BioShrimpCoding](https://forum.makecode.com/u/BioShrimpCoding)\
**Post date:** [June 11, 2025, 2:48am UTC](https://forum.makecode.com/t/raycasting-bug/37232/6 "2025-06-11T02:48:12Z")

</div>

is there a way i could make something that could do that?

---

<div class="post-metadata">

**Author:** ![BioShrimpCoding](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/bioshrimpcoding/32/13238_2.png) [@BioShrimpCoding](https://forum.makecode.com/u/BioShrimpCoding)\
**Post date:** [June 11, 2025, 7:58pm UTC](https://forum.makecode.com/t/raycasting-bug/37232/7 "2025-06-11T19:58:55Z")

</div>

could someone help me try to make a 3d verision of the lantern effect?
