I’m a beginner and I doing simple 2D game. I made a script according to a Youtube tutorial, but ground check doesn’t work.
public class Player : MonoBehaviour
{
public float moveSpeed;
public float jumpHeight;
public Transform groundCheck;
public float groundCheckRadius;
public LayerMask WhatIsGround;
private bool grouned;
// Start is called before the first frame update
void Start()
{
}
void FixedUptade()
{
grouned = Physics2D.OverlapCircle (groundCheck.position, groundCheckRadius, WhatIsGround);
}