Login / Registrieren
DE EN FR ES IT CZ
Zurück Nach oben

HorizontalScrollDistance issue.

  • #1, by ke4 9 years ago Zitieren
    Hi i have a scene slightly wider than the game resolution (1920) what i'm trying to do is to scroll the scene already when you're for about 200px from the left edge.

    Since the game resolution is 1920x1080 i would set this:
    game.HorizontalScrollDistance = 1720

    But it doesn't seem to be working. It looks like it ignores everything above 700px or so and any bigger distance is ignored.

    Any idea what is the issue here? Thanks
  • #2, by afrlme 9 years ago Zitieren
    Correct value is 200. It's pixels from the edge of the screen both sides mate.
  • #3, by ke4 9 years ago Zitieren
    It works only when it's already scrolled but to get the first scroll i need to be 200px from the right side.
  • #4, by afrlme 9 years ago Zitieren
    Could try using an action area I suppose? Or a loop that listens out for characters position. I dunno mate.
  • #5, by ke4 9 years ago Zitieren
    Yeah that's not a bad idea, i just though it's somehow possible to set this.
    I've just set the loop, the scrolling animated through the to() function for some reason isn't that smooth but it looks okay.
  • #6, by afrlme 9 years ago Zitieren
    Tried out some of the other easing options for the to() function? I think the default one is easeLinearInOut. If you want it to build up speed then use easeQuintIn or easeQuintInOut if you want it to slow down towards the end too or use easeQuintOut for it to slow down at the end only.
  • #7, by ke4 9 years ago Zitieren
    Yeah i was trying some of them.
    At the end it's just about mixing the right easing with a correct length of the animation.

    easeSineInOut works probably the best for me.
  • #8, by afrlme 9 years ago Zitieren
    Yeah i was trying some of them.
    At the end it's just about mixing the right easing with a correct length of the animation.

    easeSineInOut works probably the best for me.
    I guess that makes sense seeing as it's the big curved ~wavey ~ one. At least you managed to get it sorted out one way or another.

  • #9, by ke4 9 years ago Zitieren
    Yeah it's more decent than the easeInOutQuint, that one is way to curvy.
    Anyway works great now. Thanks.