How do I sync physics objects with Scroll To behavior?

0 favourites
  • 2 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • I was working on a short game using the "Platformer" example file.

    I noticed that when I added a Scroll To behavior (to test the parallax layer settings), all the Box2D physics objects were behaving strangely, as if the Scroll To was scrolling beyond the layout rather than keeping within the boundaries. This resulted in the enemies glitching into platforms and the bullets shooting from the center of the screen rather than from the player.

    I am hosting the broken and unbroken project files on Dropbox:

    dl.dropboxusercontent.com/u/96056198/Bo/Beta%202.0/index.html

    dl.dropboxusercontent.com/u/96056198/Bo/Beta%202.0%20Broken/index.html

    dl.dropboxusercontent.com/u/96056198/Bo/Beta%202.capx

    dl.dropboxusercontent.com/u/96056198/Bo/Beta%202%20Broken.capx

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • When using the different Parallax in layers, the actual X and Y coordinates are not the same on each layer as you think when your viewing. It is beyond the layer, as you say. Think of it like this. When your scrolling, the blocks are going to the X and Y of the layer with different Parallax. The layers are moving at different rates when you're scrolling.

    Not all your inks are working, so I can't see why you need the them to have different Parallax settings.

    If the Parallax is for background effect, create more layers and keep the blocks the upper layer with 0,0 settings.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)