Steering behavior

Hello guys,

I am trying to implement a steering behavior based on boids, and I use Understanding Steering Behaviors: Seek as reference material.

Unfortunately I get stuck at the very beginning already and I just dont understand why.
Here is my code:

Vector3 desiredVel = (target - unit.transform.position).normalized * 25 * Time.deltaTime;
Vector3 currentVel =  unit.transform.forward.normalized * 25 * Time.deltaTime;
Vector3 steering = desiredVel - currentVel;
unit.transform.position = unit.transform.position + steering;

When applying this code to move my unit, it can only move backwards, not forward or to the side. According to the tutorial however, it should make my unit gradually turn, and move forward. What am I doing wrong?

In order to move your guy you only need the first line:

Vector3 desiredVel = (target - unit.transform.position).normalized * 25 * Time.deltaTime;

then it depends if you are rotating it or not, if rotating:

transform.rotation = Quaternio.LookRotation(desiredVel);
transform.Translate(transform.forward*Time.deltaTime);

If you are not rotating then you skip the rotation part and apply the desired vector to your movement:

transform.Translate(desiredVel * Time.deltaTime);

By the way, the forward is already normalized so n need to double check.