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

Setting sprite scale to 0 will permanently make it invisible. #45

Open
Anh302kay opened this issue May 3, 2023 · 2 comments
Open

Setting sprite scale to 0 will permanently make it invisible. #45

Anh302kay opened this issue May 3, 2023 · 2 comments

Comments

@Anh302kay
Copy link

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.

@WinterMute
Copy link
Member

Why are you setting the sprite scale to 0?

@Anh302kay
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants