# Is there a way to make auto scrolling camera?

**URL:** https://forum.makecode.com/t/is-there-a-way-to-make-auto-scrolling-camera/946
**Category:** Arcade
**Created:** [December 24, 2019, 12:21pm UTC](https://forum.makecode.com/t/is-there-a-way-to-make-auto-scrolling-camera/946 "2019-12-24T12:21:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![reyhanPanci256](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/reyhanpanci256/32/1770_2.png) [@reyhanPanci256](https://forum.makecode.com/u/reyhanPanci256)
#### Post date: [December 24, 2019, 12:21pm UTC](https://forum.makecode.com/t/is-there-a-way-to-make-auto-scrolling-camera/946/1 "2019-12-24T12:21:31Z")

</div>

i’m making a vertical platformer, is there a way to vertically scroll the camera

---

<div class="post-metadata">

### Author: ![jwunderl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jwunderl/32/5308_2.png) [@jwunderl](https://forum.makecode.com/u/jwunderl)
#### Post date: [December 25, 2019, 1:18am UTC](https://forum.makecode.com/t/is-there-a-way-to-make-auto-scrolling-camera/946/2 "2019-12-25T01:18:48Z")

</div>

There isn’t a single block solution for it, but you can make that happen with `on game update` and `center camera at`:

> **[eg](https://arcade.makecode.com/77630-48297-56116-50563)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

 ![arcade-screenshot (5)](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/4d09c2e916d39f2cdcc9a82cc3fa629993294a66.png)

sidenote, if you’re using a tilemap (which I would be guessing you will for a platformer) you can leave the x as just 0 / omit the `screen width / 2` if you want, though there isn’t a huge benefit to doing so; the tilemap automatically constrains the camera to not show outside of the tilemap (this behavior is extra nice when you get to the bottom of the level - it will leave the bottom as the bottom of the screen, and not fill up halfway with empty space while centering onthe sprite.)

---

<div class="post-metadata">

### Author: ![reyhanPanci256](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/reyhanpanci256/32/1770_2.png) [@reyhanPanci256](https://forum.makecode.com/u/reyhanPanci256)
#### Post date: [December 26, 2019, 11:50pm UTC](https://forum.makecode.com/t/is-there-a-way-to-make-auto-scrolling-camera/946/3 "2019-12-26T23:50:08Z")

</div>

thanks! 🙂
