Rigid body add force at position

So basicly my game is a 2d birds eye view space game where every object can only move on the x and z axis. The player can fire projectiles at asteroids and i was trying to make an AddForceAtPosition effect when the asteroid is hit to simulate a little more physics realism. I looked at the reference and had a few tries but my code didnt work. I didnt know how to apply the function into my collider code on line 3 because im a noob at functions.

void OnTriggerEnter ( Collider collider){
		if(collider.gameObject.CompareTag ("Projectile"))
			ApplyForce();
			health -= 1;
			
		if(health == 0){
			health = 6;
			transform.position = new Vector3(Random.Range (-25.0f,25.0f),0,Random.Range (-25.0f,25.0f));
		}
		
	}
	void ApplyForce(Rigidbody body){
		Vector3 direction = body.transform.position - transform.position;
		body.AddForceAtPosition(direction.normalized, transform.position);
			
	}
}

“does not add force to the position”: But what’s wrong with it? Does it add no force at all? Or is it no change from normal AddForce?

For a test, shoot the edge of a wide object. Adding at the position should start the object spinning, and moving at a diagonal from the bullet (like a tricky pool ball shot.)

One obvious problem: you’re using transform.position, which is the center of the object. The whole point is to use where you hit it (AddForceAtPosition using the object center works, but is the same as regular add force.) I think you need to use OnCollisionEnter to even look up where you hit, from collision. Triggers don’t give you that extra info.