I'm using libgdx with box2d. Write me a util method that calculates the linear velocity needed to smoothly push a box2d body to a target position without overshooting the target.

Overshooting happens the the velocity returned is greater than needed to reach the target when applied to a box2d body

Note, maxSpeed is the maximum desired speed for the returned velocity, there is no minimum however. A returned velocity that is <= maxSpeed does NOT guarantee no overshooting 
Also note, you likely need to utilize delta time

This method should be able to handle high maxSpeed parameters.
 I should be able to call this method every frame like so
```java
            Vector2 velocity = PhysicsUtils.velocityToPosition(body, target, maxSpeed);
            body.setLinearVelocity(velocity);
```

Assume you have access to, but not limited to:
PhysicsSystem.STEP_FREQUENCY (when physics timestep = 1/60f, this = 60f)

Here's what I came up with but it doesn't work.

```java
    public static Vector2 velocityToPosition(Body body, Vector2 targetPosition, float maxSpeed) {
        Vector2 position = body.getPosition();
        Vector2 velocity = body.getLinearVelocity();

        // point in target direction
        Vector2 targetDirection = targetPosition.cpy().sub(position);

        float distance = targetDirection.len();

        // Calculate distance that can be covered in one frame
        float maxDistance = maxSpeed / PhysicsSystem.STEP_FREQUENCY;

        if (distance <= maxDistance) {
            velocity.set(targetDirection);
        } else {
            velocity.set(targetDirection.scl(maxSpeed / distance));
        }

        // If passed target position, zero velocity
        if (velocity.dot(targetDirection) < 0) {
            velocity.setZero();
        }
        return velocity;
    }
```