# Mouse problem

**URL:** https://forum.makecode.com/t/mouse-problem/40300
**Category:** Help
**Tags:** game
**Created:** [November 7, 2025, 7:23pm UTC](https://forum.makecode.com/t/mouse-problem/40300 "2025-11-07T19:23:18Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![AgentBoom](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/agentboom/32/16635_2.png) [@AgentBoom](https://forum.makecode.com/u/AgentBoom)
#### Post date: [November 7, 2025, 7:23pm UTC](https://forum.makecode.com/t/mouse-problem/40300/1 "2025-11-07T19:23:18Z")

</div>

Hello! Sorry for the two topics in a row, but I need help with one other thing:

> **[BallWorld civil war](https://arcade.makecode.com/93674-12928-84941-89314)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

In this project I’m trying to make the cursor stay with the mouse and still work with shooting. I’ve tried making the cursor sprite relative to camera, but that just messes up aiming. I can’t explain it: try moving to the other end of the map in this example project and shoot with left-click and you’ll see for yourself.  
Thanks in advance!

---

<div class="post-metadata">

### Author: ![Bilangus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/bilangus/32/33219_2.png) [@Bilangus](https://forum.makecode.com/u/Bilangus)
#### Post date: [November 7, 2025, 10:01pm UTC](https://forum.makecode.com/t/mouse-problem/40300/2 "2025-11-07T22:01:18Z")

</div>

I have no clue why this happens but heres a solution!

 ![1000080206](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/2/3/23c68ee684915d1a03e4e4d052b9434730e12829.jpeg)

Essentially checks how far the camera scrolled to correctly update the cursors position.  
Btw i didnt actually figure this out i got it from @swirlix all credit to them.

---

<div class="post-metadata">

### Author: ![AgentBoom](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/agentboom/32/16635_2.png) [@AgentBoom](https://forum.makecode.com/u/AgentBoom)
#### Post date: [November 8, 2025, 5:47pm UTC](https://forum.makecode.com/t/mouse-problem/40300/3 "2025-11-08T17:47:04Z")

</div>

Awesome, thanks a lot! To you for giving me this and to @swirlix for creating it!

---

<div class="post-metadata">

### Author: ![swirlix](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/swirlix/32/35624_2.png) [@swirlix](https://forum.makecode.com/u/swirlix)
#### Post date: [November 10, 2025, 6:05pm UTC](https://forum.makecode.com/t/mouse-problem/40300/4 "2025-11-10T18:05:43Z")

</div>

I think @WoofWoof taught me that

---

<div class="post-metadata">

### Author: ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)
#### Post date: [November 11, 2025, 3:41am UTC](https://forum.makecode.com/t/mouse-problem/40300/5 "2025-11-11T03:41:18Z")

</div>

Yes, I, the all knowing WoofWoof, have entrusted this sacred knowledge with you once before. Indeed.

---

<div class="post-metadata">

### Author: ![Bilangus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/bilangus/32/33219_2.png) [@Bilangus](https://forum.makecode.com/u/Bilangus)
#### Post date: [November 11, 2025, 7:05pm UTC](https://forum.makecode.com/t/mouse-problem/40300/6 "2025-11-11T19:05:20Z")

</div>

So you taught swirlix, who (indirectly) taught me, and then i shared the code with agentboom. What a marvelous chain of events!
