# My Mario is teleporting

**URL:** https://forum.makecode.com/t/my-mario-is-teleporting/16397
**Category:** Help
**Tags:** game
**Created:** [November 18, 2022, 5:37pm UTC](https://forum.makecode.com/t/my-mario-is-teleporting/16397 "2022-11-18T17:37:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Milo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/milo/32/6567_2.png) [@Milo](https://forum.makecode.com/u/Milo)
#### Post date: [November 18, 2022, 5:37pm UTC](https://forum.makecode.com/t/my-mario-is-teleporting/16397/1 "2022-11-18T17:37:31Z")

</div>

When you press J & L for some reason Mario keeps on teleporting

> **[Super Smash Brothers](https://arcade.makecode.com/S01045-90421-06500-72917)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

### Author: ![randomuser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/randomuser/32/32505_2.png) [@randomuser](https://forum.makecode.com/u/randomuser)
#### Post date: [November 18, 2022, 5:48pm UTC](https://forum.makecode.com/t/my-mario-is-teleporting/16397/2 "2022-11-18T17:48:08Z")

</div>

Works fine for me?

---

<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: [November 18, 2022, 6:30pm UTC](https://forum.makecode.com/t/my-mario-is-teleporting/16397/3 "2022-11-18T18:30:22Z")

</div>

@Milo I think your animations are the culprit:

Because you have animations that change size each frame, you might want to try creating a hidden “body sprite” that you use for all of your physics and a second “display sprite” that just animates.

Here’s some example code demonstrating what I mean:

> **[smooth-animation-example](https://arcade.makecode.com/S42912-57944-98397-79670)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

The sprite on the left is actually two sprites; one is running an animation that changes size each frame and the other doesn’t animate at all. We do all of the physics/controls/overlaps etc. on the sprite that doesn’t change while the animating sprite is just placed on top of the non-animating one each frame.

The buggy sprite on the right uses one sprite for both animations and physics and it jitters/teleports whenever the current frame in the animation changes size
