rigidbody.AddImplosionForce

I’ve been playing around with adding knockback to attacks in my game through rigidbody.AddExplosionForce. It’s been working fine, but I need to know something related to that:

One attack, instead of giving a knockback effect, is supposed to draw its targets closer to its centerpoint. How do I do this with rigidbodies?

rigidbody.addforce(vector3 direction);

direction = vector3 impactpoint - pulledObject.transform.position;

you now have a direction that goes from pulled object to the impact site and you applied force to move it in that direction.

Mark as answered.

Happy Coding.