How can i scroll the background on y-axis?

fongorfongor Member, PRO Posts: 18


Thanks for helping!

Comments

  • fongorfongor Member, PRO Posts: 18

    Please~~

  • NNterprisesNNterprises Member, PRO Posts: 387

    It all depends on what you need you need to be specific. Is it just a moving background? Does it scroll when you swipe? ... etc

    But if you want it to move in the background you can do a lot of things...

    Make a background actor and stretch it to the size needed

    Choose one of the following to make it move down 1000 pixels for 10 seconds:

    1. Put a rule in the actor to Interpolate self.position.Y to -1000 in 10 seconds .
    2. Just go into attributes and make linear velocity Y = -100
    3. Put a rule in the actor to Move in direction DOWN (270 maybe i think) with speed -100
    4. You can also use Constrain self.position.y to self.position.y - # (don't feel like doing math)
    5. You can use accelerate but that's a bit different
    6. "Move to"
    7. More things
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    Below is a tutorial about scrolling on the X axis, you could use the same methods but use the Y axis instead. I believe the source file download (linked in the description) has both horizontal and vertical samples.

  • fongorfongor Member, PRO Posts: 18

    @NNterprises said:
    It all depends on what you need you need to be specific. Is it just a moving background? Does it scroll when you swipe? ... etc

    But if you want it to move in the background you can do a lot of things...

    Make a background actor and stretch it to the size needed

    Choose one of the following to make it move down 1000 pixels for 10 seconds:

    1. Put a rule in the actor to Interpolate self.position.Y to -1000 in 10 seconds .
    2. Just go into attributes and make linear velocity Y = -100
    3. Put a rule in the actor to Move in direction DOWN (270 maybe i think) with speed -100
    4. You can also use Constrain self.position.y to self.position.y - # (don't feel like doing math)
    5. You can use accelerate but that's a bit different
    6. "Move to"
    7. More things

    um...I can't make it works,i want the background unlimited automatically move up,anyway,thanks for your help!!

  • fongorfongor Member, PRO Posts: 18

    @jamie_c said:
    Below is a tutorial about scrolling on the X axis, you could use the same methods but use the Y axis instead. I believe the source file download (linked in the description) has both horizontal and vertical samples.

    I have already tried it ,it seems not work on y-axis 90 angle

  • fongorfongor Member, PRO Posts: 18

    @fongor said:

    @NNterprises said:
    It all depends on what you need you need to be specific. Is it just a moving background? Does it scroll when you swipe? ... etc

    But if you want it to move in the background you can do a lot of things...

    Make a background actor and stretch it to the size needed

    Choose one of the following to make it move down 1000 pixels for 10 seconds:

    1. Put a rule in the actor to Interpolate self.position.Y to -1000 in 10 seconds .
    2. Just go into attributes and make linear velocity Y = -100
    3. Put a rule in the actor to Move in direction DOWN (270 maybe i think) with speed -100
    4. You can also use Constrain self.position.y to self.position.y - # (don't feel like doing math)
    5. You can use accelerate but that's a bit different
    6. "Move to"
    7. More things

    um...I can't make it works,i want the background unlimited automatically move up,anyway,thanks for your help!!

    i found the y-axis file!thanks

  • fongorfongor Member, PRO Posts: 18

    @fongor said:

    @jamie_c said:
    Below is a tutorial about scrolling on the X axis, you could use the same methods but use the Y axis instead. I believe the source file download (linked in the description) has both horizontal and vertical samples.

    I have already tried it ,it seems not work on y-axis 90 angle

    But it doesn't on 90 y-axis

  • NNterprisesNNterprises Member, PRO Posts: 387

    Not sure what you're saying by 90 y axis... You're just saying "move straight up" right? Are you trying to rotate it to 90 degrees too?

    You just want it to move UP VERTICALLY right (on the Y axis)?

  • fongorfongor Member, PRO Posts: 18

    @NNterprises said:
    Not sure what you're saying by 90 y axis... You're just saying "move straight up" right? Are you trying to rotate it to 90 degrees too?

    You just want it to move UP VERTICALLY right (on the Y axis)?

    yup!that's what i want!

  • NNterprisesNNterprises Member, PRO Posts: 387

    You may have to post your file, if Jamie's tutorial didn't work if you switched it to Y instead of X, and if none of mine worked, there's a bigger issue that we cannot see

    Make sure MOVEABLE is checked in your background actor too maybe

  • fongorfongor Member, PRO Posts: 18
    edited July 2016

    @NNterprises said:
    You may have to post your file, if Jamie's tutorial didn't work if you switched it to Y instead of X, and if none of mine worked, there's a bigger issue that we cannot see

    Make sure MOVEABLE is checked in your background actor too maybe

    When I use your method, the background will scroll, but I want to be one after the other with a scroll background

  • imjustmikeimjustmike Member Posts: 450

    Do you mean parallax scrolling?

  • fongorfongor Member, PRO Posts: 18

    @imjustmike said:
    Do you mean parallax scrolling?

    Nope,it's like I want 90 degrees.thanks for your help!

  • imjustmikeimjustmike Member Posts: 450

    The issue is, we don't know what you mean by "I want 90 degrees" - try saying it a different way. From what I can tell you want a vertically scrolling background, which people have provided you solutions for. Either you're not following the tutorials correctly, or there's some other issue in your code. OR we have no idea what you mean and are going round in circles.

  • KevinCrossKevinCross London, UKMember Posts: 1,894

    Do you want to scroll the background down or up?

  • fongorfongor Member, PRO Posts: 18

    @KevinCross said:
    Do you want to scroll the background down or up?

    scroll it up,thanks!

  • KevinCrossKevinCross London, UKMember Posts: 1,894

    @fongor said:

    @KevinCross said:
    Do you want to scroll the background down or up?

    scroll it up,thanks!

    I've amended the code in the video tutorial from @jamie_c so that it scrolls upwards (see attached)

Sign In or Register to comment.