Hi!
I have a prefab gameobject with a playermovement script and it has a flip function below.
The function works fine and I have had a few animation clips on it for some time.
However, recently I tried adding a new clip with keyframes that adjusts the player’s rotation in a while that makes it look like it is spinning.
After making this new clip, my character no longer flips.
I tried removing all the keyframes in my animation clip and it went back to normal.
Is there any reason why adding a new animation clip would block my player from flipping?
Any help would be really appreciated as I am quite new to Unity!
Thanks
private void flip()
{
facingRight = !facingRight; // updates facing direction
Vector3 flipped = transform.localScale;
flipped.z *= -1f;
transform.localScale = flipped;
transform.Rotate(0, 180, 0);
}