I want to be able to calculate the required force to cause a specific point velocity on a rigidbody.
If the force is applied at the centre of mass using AddForce() then it is straightforward as force = mass * acceleration. Eg, if i wanted to counteract gravity, i would do AddForce(-Physics.gravity * rb.mass), or if i wanted to stop the rigid body instantaneously i would do AddForce(rb.mass * rb.velocity / Time.fixedDeltaTime). Of course, one could use the different forcemodes to get the same effect.
Torque is a little more complicated, as you have to scale by the inertia tensor instead of mass, but otherwise the same.
However, I want to know how to calculate the required force at a given point for the desired effect. For example, if the point velocity at the point p is 10ms along the x axis (y and z zero), then doing AddForceAtPosition(new Vector3(-10, 0, 0,) * someScaleFactor / Time.fixedDeltaTime, p) should cause the point velocity at point p, to become 0 (of course it wont necessarily remain 0 in subsequent frames, but after applying the force it should be 0). How do i calculate someScaleFactor?
Hopefully ive explained this correctly. Also, do the forcemodes work as i would expect using AddForceAtPosition()? Ie, would using ForceMode.velocityChange with -rb.GetPointVelocity() cause that point to stop as described above?