AnimationCurve - curve editing window

I have managed to get a game object to move horizontally with one of these but I can’t get it to move vertically via m_vectNewPos.y=m_AnimationCurve.Evaluate(m_fTimer);

I tried editing the diamond on the far right of that window and change its time value to 0.001.
But m_AnimationCurve.Evaluate(m_fTimer); still returns the same y value resulting in the game object moving horizontally but not vertically.

Suggestions?

a animation curve does not return a 2d coordinate, it is just returning a value, based on the time value you feed into Evaluate.

The X Axis of the curve is time, and the curves y axis is value, if you wanted to effect the x axis, you would just return the resulting value of Evaluate to your m_vectNewPos.x

What do you call to get the y value then so I can use it to move my object up?

Evaluate you call it with a x value and it returns the y value for that x.

All the curve is doing is providing a user driven way to map a value over time, or what every parameter x on the curve is in your use case

OK thankyou BoredMormon - the following worked first pop. But I still don’t understand how you came up with that value for ‘b’ in ax2 + bx + c
I would like to try and understand if you are prepared to explain it to me.

    private float Quadratic(float fX)
    {
        float fY = 0.0f,
              fA = -1.0f,
              fB = (m_vectTargetPosition.y - (fA * m_vectTargetPosition.x * m_vectTargetPosition.x)) / m_vectTargetPosition.x;

        fY = (fA * fX * fX) + (fB * fX);

        return fY;
    }

    protected override void Update()
    {
        if (m_bRunAnimation && !IsHidden())
        {
            m_fX += Time.deltaTime;
            m_fY = Quadratic(m_fX);
            Vector3 vectDeltaPos = new Vector3(m_fX, m_fY, 0.0f);
            transform.localPosition = m_vectStartPos + vectDeltaPos;

            if (transform.localPosition.x >= m_vectEndPos.x)
            {
                DoShow(false);
                m_bRunAnimation = false;
                transform.localPosition = m_vectStartPos;
            }
        }
    }