# Overlap Detection for Transparent Sprites

**URL:** https://forum.makecode.com/t/overlap-detection-for-transparent-sprites/40862
**Category:** Help
**Created:** [December 9, 2025, 9:42pm UTC](https://forum.makecode.com/t/overlap-detection-for-transparent-sprites/40862 "2025-12-09T21:42:42Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ARandomGuyOnMakeCode](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/arandomguyonmakecode/32/22983_2.png) [@ARandomGuyOnMakeCode](https://forum.makecode.com/u/ARandomGuyOnMakeCode)
#### Post date: [December 9, 2025, 9:42pm UTC](https://forum.makecode.com/t/overlap-detection-for-transparent-sprites/40862/1 "2025-12-09T21:42:42Z")

</div>

I was intending on using sprites to function as hitboxes for enemy and player attacks for the combat system I’m working on, but I just realized that transparent sprites aren’t considered when the overlapping event is called. Is there any way to detect when transparent sprites are overlapping with another sprite? If not, is there another built-in way I can achieve a similar effect? I’m not too keen on making my own collision system 😞.

---

<div class="post-metadata">

### Author: ![WoodysWorkshop](https://avatars.discourse-cdn.com/v4/letter/w/ea666f/32.png) [@WoodysWorkshop](https://forum.makecode.com/u/WoodysWorkshop)
#### Post date: [December 10, 2025, 6:32pm UTC](https://forum.makecode.com/t/overlap-detection-for-transparent-sprites/40862/2 "2025-12-10T18:32:20Z")

</div>

Use location instead?

I.e: Player overlaps Sprite AT COORDINATES (get player coordinates to compare to hitbox sprite)

Share your project and I’ll have a closer look 🙂

There will probably be a simpler solution. I’d just like to see what you’re dealing with 🙂

---

<div class="post-metadata">

### Author: ![ARandomGuyOnMakeCode](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/arandomguyonmakecode/32/22983_2.png) [@ARandomGuyOnMakeCode](https://forum.makecode.com/u/ARandomGuyOnMakeCode)
#### Post date: [December 10, 2025, 6:33pm UTC](https://forum.makecode.com/t/overlap-detection-for-transparent-sprites/40862/3 "2025-12-10T18:33:23Z")

</div>

In case anyone is wondering, I was doing this because the enemies in my game will have melee attacks, and so I needed away to differentiate between collisions between the attacks and collisions between the enemy itself.

---

<div class="post-metadata">

### Author: ![dogSquid](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dogsquid/32/26689_2.png) [@dogSquid](https://forum.makecode.com/u/dogSquid)
#### Post date: [December 10, 2025, 6:36pm UTC](https://forum.makecode.com/t/overlap-detection-for-transparent-sprites/40862/4 "2025-12-10T18:36:47Z")

</div>

Try making the sprites not transparent… just colour them in with one colour or something to help you remember that they’re just hitboxes but I think that should solve the problem.

Unless is there some important reason that you want them to be transparent?  
(when you say transparent I assume that you mean you have left the image asset blank.)

---

<div class="post-metadata">

### Author: ![AlexK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexk/32/33339_2.png) [@AlexK](https://forum.makecode.com/u/AlexK)
#### Post date: [December 11, 2025, 3:49am UTC](https://forum.makecode.com/t/overlap-detection-for-transparent-sprites/40862/5 "2025-12-11T03:49:37Z")

</div>

Similarly, you could try making them invisible instead of transparent. Invisible sprites still invoke overlaps.

---

<div class="post-metadata">

### Author: ![ARandomGuyOnMakeCode](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/arandomguyonmakecode/32/22983_2.png) [@ARandomGuyOnMakeCode](https://forum.makecode.com/u/ARandomGuyOnMakeCode)
#### Post date: [December 11, 2025, 5:25pm UTC](https://forum.makecode.com/t/overlap-detection-for-transparent-sprites/40862/6 "2025-12-11T17:25:59Z")

</div>

Thank you so much! I didn’t even know you could do that 👍 😄 :monkey: 🍞 💸 (set the sprite flag to invisible for anyone who is wondering)
