Wrapping with Scroll To = bad

  • Link to .capx file (required!):

    dropbox.com/s/6lsfl7jlltspwpz/WrappingScroller2.capx

    Steps to reproduce:

    1. Create a layout larger than the view

    2. Create a player sprite with Wrap To behavior

    3. Scroll the view to the player's position

    4. Populate the layout with enemy sprites also with Wrap To

    5. Move the player player past the boundary of the layout

    Observed result:

    Enemies on the other side of the layout boundary are not visible until you cross the boundary.

    A large gap is created at the layout boundary (about 23 pix in my case)

    Physics based objects get jarred when passing the boundary.

    Expected result:

    With the view scrolling to the player and everything wrapping, you should be able to see enemies on the other side of the wrap point before you cross.

    There should be no gaps at the wrap boundary.

    Physics objects should pass thru the wrap point undisturbed.

    Browsers affected:

    Chrome: yes

    Firefox: yes

    Internet Explorer: yes

    Operating system & service pack: Win7 Pro SP1

    Construct 2 version: r139 (64bit)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wrap renders an object which exited the layout, on its opposite side. And that is exactly what is happening in your game. You reach, for example, the right-most of your layer and then your ship gets "teleported" to the left again.

    Also "Scroll To" doesn't bug out, it's also working as intended. There's simply nothing for it to show you, on the right or left-most edge, because that's where your layout ends and there's nothing beyond that.

    Remember that when you cross the edge, Wrap puts you on the opposite side of the layout again. That's why the enemies don't appear before crossing the treshhold - because they're not there.

    So everything is working as intended.,

    It does not wrap an entire layout on itself into an infinite loop, like you're trying to do.

    Also i remember reading Wrap shouldn't be used on Physics objects. It bugs out because of the way the Physics engine itself works.

  • Closing as this is currently by design and all working correctly. We don't support rendering wrapped layouts yet, although the feature request is on the todo list.

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