how to determine when a lerp has been competed

so i have the character controller lerping towards an object when he is close to it. while hes lerping towards it i have the FPS walker scripts and some other things turned off

the problem is that i cant figure out how to tell when he is DONE lerping so i can turn those scripts back on

how can i figure out when hes done lerping?

Only by comparing the two values.

Use Mathf.Approximately as you should never really try to compare 2 floats as rounding errors etc may make them never be equal using a == .

so like

if(transform.position   is about   target.position){


//turn scripts back on


}

?

Yes, if it is Vector3’s you are comparing as there is no Approximately comparison for Vector3’s.

Or you could compare Vector3 elements for example.

if (Mathf.Approximately(transform.position.x, target.position.x)) {
   //Turn Scripts back On
}

cool thanks alot