# Scrolling messes up collision detection

**URL:** <https://forum.kirupa.com/t/scrolling-messes-up-collision-detection/332338>\
**Category:** flash\
**Created:** [April 29, 2014, 8:47pm UTC](https://forum.kirupa.com/t/scrolling-messes-up-collision-detection/332338 "2014-04-29T20:47:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moynul\_Hussain](https://avatars.discourse-cdn.com/v4/letter/m/c2a13f/32.png) [@Moynul\_Hussain](https://forum.kirupa.com/u/Moynul_Hussain)\
**Post date:** [April 29, 2014, 8:47pm UTC](https://forum.kirupa.com/t/scrolling-messes-up-collision-detection/332338/1 "2014-04-29T20:47:27Z")

</div>

Hello guys, I am making a game and i’m having a hard time scrolling the world without my collisions being muddled up.

```php
        container = new Sprite();
        addChild(container);

        container.addChild(ground);
         container.addChild(character);

```

```php
        container.x = -character.x + stage.stageWidth / 2;

```

After implementing the code I ran the game to find this.

I add ground to the container. Inside ground is another movieclip with an instance name (bottom), and i test collision between player’s feet and ground.bottom

Can someone help me please.

P.s sorry for the second image, I don’t know how to remove, thank you);
