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

How to properly invert sprite (set negative scale) #230

Open
drgomesp opened this issue Mar 30, 2021 · 1 comment
Open

How to properly invert sprite (set negative scale) #230

drgomesp opened this issue Mar 30, 2021 · 1 comment

Comments

@drgomesp
Copy link

drgomesp commented Mar 30, 2021

I'm trying to invert a sprite by setting its scale to negative (x axis) and then simply removing and adding it to the scene again, but the sprite never gets flipped. Is there any recommended way of doing that? This is what I'm currently trying:

sprite.SetScale(-1, 1, 0)
@danaugrs
Copy link
Member

After abef212 negative sprite scaling should work. Just make sure to use a back-sided or double-sided material e.g.:

yourSpriteMaterial.SetSide(material.SideDouble)

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