Lerp coroutine jumps to position after time

I have a script that manages a world map, moving the character between the levels and such.

The player goes to the correct place and in what seems the correct amount of time but there is no smooth lerping animation, the player simply stands still for the full animation then teleports to the point they lerped to. A video of this behaviour can be found at https://i.mattdahepic.com/uCHlq

My code is as follows:

using System.Collections;
using UnityEngine;

public class WorldmapManager : MonoBehaviour {
    public GameObject background;
    public int moveLength = 40;
    public float paralaxMultiplier = 0.9f;
    public Transform[] points;
    private bool moving = false;
    private int currentSpot = 0;

	void Update () {
        if (!moving) {
            float hor = ODInput.CheckAxis("horizontal");
            if (hor > 0) { //right
                if (currentSpot + 1 >= points.Length) return;
            } else if (hor < 0) { //left
                if (currentSpot - 1 < 0) return;
        if (ODInput.CheckKeyDown("interact")) {
    private IEnumerator MoveToSpot (Vector3 spot) {
        moving = true;
        Vector3 originalPos = transform.position;
        Vector3 paralaxOriginalPos = background.transform.position;
        int frame = 0;
        while (moving) {
            transform.position = Vector3.Lerp(originalPos, spot,frame/moveLength);
            background.transform.position = Vector3.Lerp(paralaxOriginalPos, spot * paralaxMultiplier, frame/moveLength);
            if (frame >= moveLength) moving = false;
            yield return new WaitForEndOfFrame();

Thanks for your help!

Vector3.Lerp(originalPos, spot, frame/moveLength);

Frame and moveLength seem to both be integers. The result of an integer division is an integer, so with this code you’ll be calling lerp with 0 as the 3rd parameter until frame equals moveLength.

A simple cast should ensure a float result and fix the problem unless there something else wrong as well.

Vector3.Lerp(originalPos, spot, (float)frame/moveLength);