Let's assume that although it takes time to change our momentum, we're allowed to change our acceleration vector instantaneously. (If we have to model gradually changing acceleration over time, computing the optimal intercept trajectory gets much harder, so I'd argue it's not worth it - the trajectory we'll get this way still has \$C_1\$ continuity, so it ...
An elegant solution popped into my head:
The core of it is this code that should run each frame:
Vector3 desiredVector = (destination - transform.position).normalized;
Vector3 currentVector = body.velocity.normalized;
accelerationVector = desiredVector - currentVector;
This code picks an acceleration vector that will counteract momentum that is moving us ...
It looks like you want:
private void FixedUpdate()
Vector2 position = this.rb2d.position;
position.x = position.x + speed * horizontal * Time.deltaTime;
position.y = position.y + speed * vertical * Time.deltaTime;
Note that the operator before speed is a + for addition (we want to add this frame's movement ...