Exemple #1
0
    // -----------------------------------------------------------------------------
    public void Hit(Vector3 force, Vector3 pos, Rigidbody rigidBody)
    {
        if (!_isAlive)
        {
            return;
        }
        _isAlive = false;

        _baseRigidBody.useGravity = true;
        _ragdoll.SetRagdollPhysicsActive(true);

        rigidBody.AddForceAtPosition(force, pos, ForceMode.Impulse);
    }