Created
June 17, 2021 14:24
-
-
Save qqpann/2090673a5c4b39cd6c9e01ffcf589ebe to your computer and use it in GitHub Desktop.
It's better to use transform than flipX for later convenience.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (move.x > 0.01f) | |
//spriteRenderer.flipX = false; | |
transform.localScale = new Vector2(1, 1); | |
else if (move.x < -0.01f) | |
//spriteRenderer.flipX = true; | |
transform.localScale = new Vector2(-1, 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment