Currently I can move AutoParallaxBackground's "ParallaxEntity" in one axis. Like:

final AutoParallaxBackground autoParallaxBackground = new AutoParallaxBackground(0, 0, 0, 12);
autoParallaxBackground.attachParallaxEntity(new ParallaxEntity(0.0f, new Sprite(0, 0, resourcesManager.gameBackgroundRegion, vbom)));
autoParallaxBackground.attachParallaxEntity(new ParallaxEntity(-3.0f, new Sprite(0, 300, resourcesManager.gameCloudFarRegion, vbom)));

This will make the "gameCloudFarRegion" move left to right.

I want to move something from Top to bottom or bottom to top, I mean Y axis.

How can it be done?


A user on the forums has implemented a custom class for doing this. From their post:

Should be quite flexible, you can tile in just x (as the current parallax background, for side scrollers etc), just y (to make a top down shooter etc), or x & y (repeating starfields for free shooters etc).You can also place individual non repeating items in the background parallax, e.g a distant planet, the castle off in the hills etc.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.