Example #1
0
    public _Collision(Vector3 collisionPoint, float collisionRange, Vector3 normalUnit, _Collider other)
    {
        this.collisionPoint = collisionPoint;
        this.collisionRange = collisionRange;
        this.normalUnit     = normalUnit;

        collider   = other;
        gameObject = other.gameObject;
        transform  = other.transform;
        rigidbody  = other.GetComponent <_Rigidbody>();
        if (rigidbody != null && !rigidbody.enabled)
        {
            rigidbody = null;
        }
    }