void OnCollisionEnter(Collision collision) { GameObject collidedComp = collision.gameObject; if (collidedComp.transform.childCount > 0 && controller.isCompanion(collidedComp.transform.GetChild(0).gameObject)) { //Debug.Log("Collided"); //Debug.Log(collidedComp); model.setWalk(false); startAttackTime = Time.time; } }