How to scroll a tiling texture

richiconrichicon Member, PRO Posts: 55
On my GUI menus, I'd like a tiling texture to continuously scroll in the background - a little like this:
( - between 10 seconds and 20 in the video - the green checks pattern).

I tried a tiling image - which tiles OK (actor size 1024x768, image size 256x256 with X and Y Wrap selected in Graphics).

It tiles OK and fills the screen - but if I try to move it using the Motion settings in the Actor the actor moves rather than the tiling image.

How do I just scroll the tiling texture image?

Answers

  • PixelMetalPixelMetal Member Posts: 283
    Gamesalad doesn't support texture offsets.
  • richiconrichicon Member, PRO Posts: 55
    edited December 2012
    Got it working - by making the actor twice the size of the screen, then scrolling the actor and moving it back when it reached the edge.

    i.e.

    if self.position.x < 512

    do:
    Interpolate self.position.x to: 512
    for 6 seconds

    else:
    set self.position.x to 0
  • ZeroRavenZeroRaven Member Posts: 33
    From what you described you wanted the background to continuously scroll?

    Assuming the GUI is a single scene, and the background image is a sing actor, all you need to do is set the tile width/height to a value that is consistent.
    IE tile width/height 256x256 and have scene x/y set to wrap and the actor graphics height/width set to tile, then all you need to do is set the actors linear motion x or y to a value.

    I use it for scrolling starfields and parallax style backgrounds frequently.
Sign In or Register to comment.