citro2d icon indicating copy to clipboard operation
citro2d copied to clipboard

Setting sprite scale to 0 will permanently make it invisible.

Open Anh302kay opened this issue 2 years ago • 2 comments

Calling C2D_SpriteSetScale, and changing the scale to 0 will permanently make the sprite invisible. However, changing the centre of the sprite on the axis that the scale was set to 0, will make it reappear again. I've only tested this bug in citra however, so it might not occur on a real 3ds.

I think the bug is caused by these lines, where it calculates the old centre by dividing the centre by the width and height(which would be 0). It is important to note that this bug also occurs in C2D_SpriteScale.

I can provide a code example if it helps.

Anh302kay avatar May 03 '23 08:05 Anh302kay

Why are you setting the sprite scale to 0?

WinterMute avatar May 05 '23 18:05 WinterMute

I was making a test where you could increase and decrease the scale of a sprite.

Anh302kay avatar May 06 '23 00:05 Anh302kay