Vector3.RotateTowards Problem

Could someone explain why the code from Unity’s website regarding Vector3.RotateTowards does not work?

  1. Unity - Scripting API: Vector3.RotateTowards

public class ExampleClass : MonoBehaviour


// The target marker.
Transform target;

// Angular speed in radians per sec.
float speed;

void Update()
    Vector3 targetDir = target.position - transform.position;

    // The step size is equal to speed times frame time.
    float step = speed * Time.deltaTime;

    Vector3 newDir = Vector3.RotateTowards(transform.forward, targetDir, step, 0.0f);
    Debug.DrawRay(transform.position, newDir,;

    // Move our position a step closer to the target.
    transform.rotation = Quaternion.LookRotation(newDir);


Even a simple box wont rotate what so ever. I really need something like this for my game and even this example will not work.

Could someone explain why or even post a fix or an alternative?

I’m trying to achieve specialized movement in a circular direction around a point. For example, the character moves from in front of the point to the right of the point while maintaining their distance from the point. After some struggling with complicated math, I got to thinking I might be able to use Vector3.RotateTowards with the angleRadiansDelta calculated.