Scrolling: pic disapear

krousty_batkrousty_bat Member Posts: 48
edited November -1 in Working with GS (Mac)
Hi

I'm having so far a very simple scene for it's just a scrolling on Ipad format.
ma scene is 2048*768, and i'm spawning two different background of 1024*768. (no repeat).

i'm applying a move at a slow speed, and everything is working great, both screen are scrolling as expected.

Then I apply a rule: if self.position.X <= -512 (so if the screen is no longer visible if you prefere, or close to the border),
Then change attribute self.position.X = self.position.X+1024.

the screen do so, but immediately disappear after that (for both).

---------
another thing:

If I ask the background not to wait to be close to the border, BUT to be let's say 1/3 from it, Everything is working perfectly fine... very frustrating...

Any clue of Why this is happening ?
thx.

Comments

  • krousty_batkrousty_bat Member Posts: 48
    I actually found why

    I moved my camera in the middle of my 2048*768 scene (camera X=512 and Y= 0), and applied the move from there
    if self.position.X <= 0 (so if the screen is no longer visible if you prefere, or close to the border),
    Then change attribute self.position.X = self.position.X+2048

    and it's working perfectly :)

    Just wanted to say in case someone is looking for an answer with the same problems :).
Sign In or Register to comment.