Skip to content

Commit

Permalink
udpate gizmos color based on grounded state
Browse files Browse the repository at this point in the history
  • Loading branch information
gekidoslair committed May 4, 2024
1 parent 440463a commit b4e1ad7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Assets/Simple-Character-Controller/Scripts/PlayerMovement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@ private void DoRotation()

private void OnDrawGizmos()
{
// update gizmo color based on grounded state
Gizmos.color = state.isGrounded ? Color.green : Color.red;

Gizmos.DrawSphere(groundCheckPosition, groundOffset);
}
}
Expand Down

0 comments on commit b4e1ad7

Please sign in to comment.