# Making a sprite run in a circle

**URL:** <https://forum.makecode.com/t/making-a-sprite-run-in-a-circle/2561>\
**Category:** Help\
**Created:** [June 27, 2020, 9:55pm UTC](https://forum.makecode.com/t/making-a-sprite-run-in-a-circle/2561 "2020-06-27T21:55:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)\
**Post date:** [June 27, 2020, 9:55pm UTC](https://forum.makecode.com/t/making-a-sprite-run-in-a-circle/2561/1 "2020-06-27T21:55:52Z")

</div>

How can I make my sprite go in a circle? (like this)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/9/981aae93b3d2da9d91b41f975722bb90ad5d07fa.png)

---

<div class="post-metadata">

**Author:** ![felixtsu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/felixtsu/32/12024_2.png) [@felixtsu](https://forum.makecode.com/u/felixtsu)\
**Post date:** [June 29, 2020, 6:00am UTC](https://forum.makecode.com/t/making-a-sprite-run-in-a-circle/2561/2 "2020-06-29T06:00:08Z")

</div>

> **[cubicbird-helper-blocks.test](https://arcade.makecode.com/87516-81293-30864-28945)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

Built a helper block once, should work as an example, the basic idea is changing vx/vy periodically using sin/cos. Sadly the block has several issues, sprites are not in the exact circle according to parameter `radius`, and get drifted away as time goes by, but works fine if making a scrolling shooter game.

Implementation is here,

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/a/af8f6d5a11f6e567bb9e7f526ee9f52666f0dc3c.png)

Hope it helps.

---

<div class="post-metadata">

**Author:** ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)\
**Post date:** [June 29, 2020, 6:31pm UTC](https://forum.makecode.com/t/making-a-sprite-run-in-a-circle/2561/3 "2020-06-29T18:31:48Z")

</div>

Thanks! It works pretty well.

---

<div class="post-metadata">

**Author:** ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)\
**Post date:** [June 29, 2020, 6:42pm UTC](https://forum.makecode.com/t/making-a-sprite-run-in-a-circle/2561/4 "2020-06-29T18:42:43Z")

</div>

Actually, the fact that they sprites drift out add a fun challenge to my game! 😆

---

<div class="post-metadata">

**Author:** ![adumont](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/adumont/32/3063_2.png) [@adumont](https://forum.makecode.com/u/adumont)\
**Post date:** [January 17, 2021, 4:03pm UTC](https://forum.makecode.com/t/making-a-sprite-run-in-a-circle/2561/5 "2021-01-17T16:03:38Z")

</div>

Maybe you can with the Animation extension and using an SVG defined path? (Just an idea, I haven’t tried)

---

<div class="post-metadata">

**Author:** ![NxNMatrixGL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/nxnmatrixgl/32/2553_2.png) [@NxNMatrixGL](https://forum.makecode.com/u/NxNMatrixGL)\
**Post date:** [August 8, 2022, 5:04pm UTC](https://forum.makecode.com/t/making-a-sprite-run-in-a-circle/2561/6 "2022-08-08T17:04:45Z")

</div>

Very useful! Thanks!
