Do not turn player graphics if the x axis did not change

This commit is contained in:
Martin 2023-01-02 14:17:39 +01:00
parent 5bb00aacf9
commit 7e6486775f

View File

@ -91,9 +91,9 @@ export class Player extends Component {
this.animation.play("Move");
}
if (movement.x <= 0) {
if (movement.x < 0) {
this.playerGraphics.setScale(new Vec3(1, 1, 1));
} else {
} else if (0 < movement.x) {
this.playerGraphics.setScale(new Vec3(-1, 1, 1));
}
} else {