Fix isOnGround issue with shape judgment.