I have a Player gameobject and it has a child gamobject attached to it, the Player gameobject has a script attached to it which basically flips the Player, but it also flips the Player’s child gameobject. How Can I Make The Player’s Child GameObject Not Flip, While The Player Still Flips While Moving Left Or Right
Here’s My Script:
private void Flip(float horizontal)
{
if (horizontal > 0 && !facingRight || horizontal < 0 && facingRight)
{
facingRight = !facingRight;
Vector3 thescale = transform.localScale;
thescale.x *= -1;
transform.localScale = thescale;
}
}