How does addrelativeforce work?

I took 2 objects a sphere and a capsule. The script attached to sphere:

public class Sphere : MonoBehaviour 
{
	public Transform capsule;

	void Start()
	{
		this.transform.LookAt (capsule);
		this.GetComponent<Rigidbody> ().AddRelativeForce (Vector3.forward * 2000f);
	}
}

The sphere turns towards the capsule but moves along it’s previous z-axis. Shouldn’t the sphere move towards the capsule?

In my Unity, the sphere is rotating correctly, and moving towards the capsule in its new z-axis. But only once, at the Start.

AddRelativeForce is a helper method for you to add forces to rigidbodies in their local space. You can always achieve this by using AddForce instead, but you would have to add some extra code to it.

[107605-untitled.jpg|107605]

Thanks for the reply. As you can see in the image when I press play, the local coordinates of the sphere are shifting to face the capsule. But it is still moving along it’s previous z-axis. Why is that?