I'm trying to make a Seek and Flee behavior for an AI project. I tried putting the algorithm but I get this error. I'm not getting why it is not working and I could use some guidance.
Here is the segment of code that isn't working:
public Vector2 Seek(Vector2 source, Vector2 target, float maxAccel)
{
Vector2 acceleration = (target - source).Normalize() * maxAccel;
return acceleration;
}