Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlxScrollZone stops scrolling #27

Open
DigiEggz opened this issue Jun 3, 2016 · 0 comments
Open

FlxScrollZone stops scrolling #27

DigiEggz opened this issue Jun 3, 2016 · 0 comments
Labels

Comments

@DigiEggz
Copy link

DigiEggz commented Jun 3, 2016

After a certain amount of time, the scrollMatrix stops functioning because it eventually goes out of bounds.

This can be fixed by resetting the scrollMatrix after it has scrolled the length of the input graphic. Add the following code after data.source.pixels.draw(zone.buffer, zone.drawMatrix); in scroll()

if(zone.scrollMatrix.tx <= -zone.region.width)      
    zone.scrollMatrix.tx = 0; 
@Dovyski Dovyski added the bug label Jun 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants