Skip to content

Commit

Permalink
Fixed a bug sometimes causing enemies (woody) to have their scale set…
Browse files Browse the repository at this point in the history
… to 0, making them invisible until they moved (#228)
  • Loading branch information
CalmPewter committed Dec 15, 2023
1 parent 3cfac81 commit 6e037ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/_Project/Scripts/EnemyAI/EnemyAIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ private void FaceTowardsTarget(Vector2 target)
Vector3 newScale = new Vector3(GetDirectionTowards(target), 1, 1);
// Debug.Log(newScale);

transform.localScale = newScale;
transform.localScale = newScale.x != 0 ? newScale : transform.localScale;
}

private void TurnAround()
Expand Down

0 comments on commit 6e037ab

Please sign in to comment.