# Creating a UI (Overlay) - Relative to camera - without ghosting the sprites

**URL:** <https://forum.makecode.com/t/creating-a-ui-overlay-relative-to-camera-without-ghosting-the-sprites/8268>\
**Category:** Help\
**Created:** [May 22, 2021, 11:49pm UTC](https://forum.makecode.com/t/creating-a-ui-overlay-relative-to-camera-without-ghosting-the-sprites/8268 "2021-05-22T23:49:46Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [May 24, 2021, 4:51pm UTC](https://forum.makecode.com/t/creating-a-ui-overlay-relative-to-camera-without-ghosting-the-sprites/8268/5 "2021-05-24T16:51:34Z")

</div>

The easiest way to do this would be to not use “relative to camera”, but instead position the sprites on every frame yourself! We have some camera blocks in the scene category that are useful for this.

One note: this won’t work inside an “on game update” because the camera doesn’t get updated until _after_ that code gets run. Luckily, I added a block to @jwunderl’s jwunderl/arcade-sprite-util to make this easier:

 ![Screen Shot 2021-05-24 at 9.48.49 AM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/2/2f7584ab722b218f57d9bc1cb722ecd37476e2fb.png)

Here’s a link to the example: [https://makecode.com/\_9FkEaFey5eC9](https://makecode.com/_9FkEaFey5eC9)

---

_[View the full topic](https://forum.makecode.com/t/creating-a-ui-overlay-relative-to-camera-without-ghosting-the-sprites/8268)._
