add force to 3d object towards a point code example
Example 1: unity how to add force
public Rigidbody rb;
if(Input.GetKey(KeyCode.W))
{
rb.AddForce(100, 0, 0);
}
Example 2: unity addforce towards target
rigidbody.AddForce((target.position - transform.position) * multiplicationFactor);