I have a sprite attached to the player like an accessory and it flips along with the player when moving in the opposite direction. However, due to the player being a dog, when flipped, the accessory only flips and the position doesn't change. I want to move that sprite to a bit left every time the player flips.
if (Input.GetAxis("Horizontal") < 0)
{ spriteRnderer.flipX = true; bandanaRenderer.flipX = true; }
else if (Input.GetAxis("Horizontal") > 0)
{ spriteRnderer.flipX = false; bandanaRenderer.flipX = false; }
transform.position += new Vector3(Input.GetAxis("Horizontal") * Time.deltaTime * speed, 0);
animator.SetFloat("Speed",Mathf.Abs(Input.GetAxis("Horizontal") * Time.deltaTime * speed));
jumpSpeed = 0;