g3n / engine

Go 3D Game Engine (http://g3n.rocks)

Home Page:https://discord.gg/NfaeVr8zDg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to properly invert sprite (set negative scale)

drgomesp opened this issue · comments

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)

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)