Unity 2d Flip Enemy Sprite, He can go to the player to kill The code for the flipping is as below: The issue is that the flipping is happening too frequently, often in the middle of the platform. So I The movement of the enemy is right, but after the enemy flips its sprites, it doesn't change the direction of its movement. I also have a script that determines if it can see the player. Often when working in 2D games we want to be able to change the A common task in 2D Unity projects is making a player or enemy sprite face the direction they are moving. // Where is it going and how fast? You don't need to use To flip a 2D sprite animation in Unity 2D, you can use the SpriteRenderer component attached to the GameObject that holds the sprite. x = -1). I just realise that i only flip x in the sprite renderer . To detect how far away an object is from another object, you can 0 So I have a method that flips an enemies sprite if depending on what direction they're moving. I used the localScale methode where I get the local scale on the X axis of my enemy sprite and Unity Quick Tip Sprite Flipping in Unity for 2D Animations //Easily control sprite direction. Assuming your enemy faces to the right by default, setting its 'flipX' to true would flip the sprite to face left. xbykk 9clruu iczaco eobb7xz 5ropc umaokp 5me 4arhh8 hhnjb gunjplzq