Open HarIgo23 opened 6 months ago
I found a bug in Update BGSpriteComponent.cpp and suggest fix of its. The bug:
bg.mOffset.x = (mBGTextures.size() - 1) * mScreenSize.x - 1;
If mScrollSpeed will high, for example 600, it makes gap between two background. Cause -1 at the end of the formula is hack that makes sense only when mScrollSpeed is low.
-1
My fix keeps diff between bg.mOffset.x and width, if it more than 1px.
bg.mOffset.x += mScreenSize.x * mBGTextures.size();
I found a bug in Update BGSpriteComponent.cpp and suggest fix of its. The bug:
If mScrollSpeed will high, for example 600, it makes gap between two background. Cause
-1
at the end of the formula is hack that makes sense only when mScrollSpeed is low.My fix keeps diff between bg.mOffset.x and width, if it more than 1px.