Blender files messing up transform & lerp

So, recently I have been trying to create a system that utilizes lerp to move objects into a cup. To do this, I have created an empty game object that the ingredient will be a child of and (in this case a tomato) will travel to. When testing this with objects created in unity, it works fine. But when using a model I’ve created in blender and exported as .fbx with the Apply Transform setting enabled, it lerps lower than expected.

In the following comparison, I show the cup with a simple cube from Unity, and a tomato from Blender. Notice how one of the “Slot1Point” is lower visually (but not lower according to the transform data) than the other? In my code, there is nothing that changes how high up they should be depending on what they are. I wish I could upload a video showing the tomato moving lower but sadly I can’t :cry:.


Here's another comparison of the ingredient object locations after the lerp. The numbers look crazy (I have no idea if this is normal) but at least the Y stays the same... I'm guessing they are different because the lerp never actually reaches the target position.


The code I am using:

    public List<string> CupIngredientList = new List <string>();

    public IngredientDetection ingDetect;

    private bool Slot1Full = false;
    private bool Slot2Full = false;
    private bool Slot3Full = false;

    //Ingredient frames and instantiated references
    public GameObject stuv;
    private GameObject stuvInstant;
    public GameObject tomato;
    private GameObject tomatoInstant;

    public GameObject ingEnterPoint;

    public Transform slot1point;
    public Transform slot2point;
    public Transform slot3point;

    public Vector3 positionToMoveTo;
    public GameObject objectToMove;

 void Update()
 {
     //Checks if cup count is 1 and prepares to add object physically to cup
     if (CupIngredientList.Count == 1 && Slot1Full == false)
     {
         Debug.Log("Adding ingredient to slot 1 instantiation");
         Cup1();
     }
 }

    IEnumerator LerpPosition1(Vector3 targetPosition, float duration)
    {
        float time = 0;
        Vector3 startPosition = ingEnterPoint.transform.position;

        while (time < duration)
        {
            objectToMove.transform.position = Vector3.Lerp(startPosition, slot1point.transform.position, time / duration);
            time += Time.deltaTime;
            yield return null;
        }
    }

public void Cup1()
{
    //Checking if the slot is full, if not then will locate tag and instantiate corresponding ingredient accordingly
    if (Slot1Full == false)
    {
        Slot1Full = true;
if (ingDetect.ingTag == "Stuv") //Stuv is the basic cube
            {
                stuvInstant = (GameObject)Instantiate(stuv);

                stuvInstant.transform.parent = slot1point.transform;
                stuvInstant.transform.position = ingEnterPoint.transform.position; //ingEnterPoint is where the ingredient teleports to at first, then moves down to the correct slot
                objectToMove = stuvInstant;
                StartCoroutine(LerpPosition1(positionToMoveTo, 0.25f));

                Debug.Log("Stuv pysically added to cup");
            } else if (ingDetect.ingTag == "Tomato") //Tomato is... the tomato?
            {
                tomatoInstant = (GameObject)Instantiate(tomato);

                tomatoInstant.transform.parent = slot1point.transform;
                tomatoInstant.transform.position = ingEnterPoint.transform.position;
                objectToMove = tomatoInstant;
                StartCoroutine(LerpPosition1(positionToMoveTo, 0.25f));

                Debug.Log("Tomato physically added to cup");
            }



What can I do to make my blender objects and unity objects go to the same spot?


I’m guessing that this issue is caused by importing a Blender model which messes with the transform… Or I’ve made a silly mistake :man_facepalming:

Anyways, thank you in advance. I’m a beginner and have never done much with Blender and Unity side-by-side until now.