private void OnTriggerStay(Collider other) { if (other.gameObject.CompareTag("bodyCollider")) { BodyPushBox component = other.gameObject.GetComponent <BodyPushBox>(); if (component && component.parent) { Vector3 vector = component.parent.transform.position - this.parent.transform.position; float radius = base.gameObject.GetComponent <CapsuleCollider>().radius; float radius2 = base.gameObject.GetComponent <CapsuleCollider>().radius; vector.y = 0f; float num; if (vector.magnitude > 0f) { num = radius + radius2 - vector.magnitude; vector.Normalize(); } else { num = radius + radius2; vector.x = 1f; } if (num < 0.1f) { } } } }
private void OnTriggerStay(Collider other) { if (other.gameObject.tag == "bodyCollider") { BodyPushBox component = other.gameObject.GetComponent <BodyPushBox>(); if ((component != null) && (component.parent != null)) { float num; Vector3 vector = component.parent.transform.position - this.parent.transform.position; float radius = base.gameObject.GetComponent <CapsuleCollider>().radius; float num3 = base.gameObject.GetComponent <CapsuleCollider>().radius; vector.y = 0f; if (vector.magnitude > 0f) { num = (radius + num3) - vector.magnitude; vector.Normalize(); } else { num = radius + num3; vector.x = 1f; } } } }
private void OnTriggerStay(Collider other) { if (!(other.gameObject.tag == "bodyCollider")) { return; } BodyPushBox component = other.gameObject.GetComponent <BodyPushBox>(); if ((bool)component && (bool)component.parent) { Vector3 vector = component.parent.transform.position - parent.transform.position; vector.y = 0f; if (vector.magnitude > 0f) { vector.Normalize(); } else { vector.x = 1f; } } }