How do I sync physics objects with Scroll To behavior?

Get help using Construct 2

Post » Sun May 04, 2014 5:44 pm

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
B
3
Posts: 1
Reputation: 177

Post » Tue May 06, 2014 1:56 am

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.
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,283


Return to How do I....?

Who is online

Users browsing this forum: DharmaOne, namaewayukidesu, nirwan1911, Yahoo [Bot] and 7 guests