0 Favourites

How do I sync physics objects with Scroll To behavior?

  • 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

  • Construct 3

    Buy Construct 3

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

    Buy 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)
Similar Topics Posts Views Last Post
Unread hot topic
1,941 263,299
FlyingRam's avatar
FlyingRam
Unread hot topic
0 Favourites
[BEHAVIOR] Chipmunk Physics
673 82,511
nelostic's avatar
nelostic
Unread hot topic
0 Favourites
[Behavior] LiteTween
672 169,893
manujorgo's avatar
manujorgo