Open Matthewek opened 11 years ago
If sprites TEXTURE REGION is rotated , and than you try to flip your sprite, you will receive following result:
Assumption: sprite`s texture region X is rotated
sprite with texture region X, is set to be flipped vertically - results as flipped horizontally
sprite with texture region X, is set to be flipped horizontally - results as flipped vertically
Temporary solution would be changing setFlippedHorizontal method from Sprite class to:
public void setFlippedHorizontal(final boolean pFlippedHorizontal) { if (getTextureRegion().isRotated()) { if(this.mFlippedVertical != pFlippedHorizontal) this.mFlippedVertical = pFlippedHorizontal; } else { if(this.mFlippedHorizontal != pFlippedHorizontal) this.mFlippedHorizontal = pFlippedHorizontal; } this.onUpdateTextureCoordinates(); }
But I believe its just not right solution (work though) I believe its something messed with onUpdateTextureCoordinates() but I am little bit confused now with ISpriteVertexBufferObject
If sprites TEXTURE REGION is rotated , and than you try to flip your sprite, you will receive following result:
Assumption: sprite`s texture region X is rotated
sprite with texture region X, is set to be flipped vertically - results as flipped horizontally
sprite with texture region X, is set to be flipped horizontally - results as flipped vertically
Temporary solution would be changing setFlippedHorizontal method from Sprite class to:
But I believe its just not right solution (work though) I believe its something messed with onUpdateTextureCoordinates() but I am little bit confused now with ISpriteVertexBufferObject