Hello guys, im a new programmer trying to understand one of brackeys script.
the script is the “CharacterController2D”.
Collider2D[ ] colliders = Physics2D.OverlapCircleAll(m_GroundCheck.position, k_GroundedRadius, m_WhatIsGround);
for (int i = 0; i < colliders.Length; i++)
if (colliders[i].gameObject != gameObject)
m_Grounded = true;
if (!wasGrounded && m_Rigidbody2D.velocity.y < 0)
i dont know why the code check is game object is not equal to itself. Can anyone explain this to me? Thanks in advance