Distance between Vector3 and Transform

I’m using leap to move an object towards a vector3.

However, I want something to happen in script when it arrives, so I’m intending to use distance to know when the object is near the intended point, and change a value on arrival.

Thing is, the game object is using lerp towards a vector3, but the actual game object being moved is a transform.position.

How do you compare them to get distance?

Thank-you.

can get distance,

transform.position is vector3

Thanks, how would you compare though, you’d have to assign the transform.position to ‘other’ so it knows where it’s comparing too… you can’t assign a vector3 directly…

the target position is in script only, as a vector3, there’s no transform.position to assign

if want to compare this transform position, to vector3 target,

float dist = Vector3.Distance(transform.position,target);

it takes 2 variables, both vector3
Distance(Vector3 a, Vector3 b);

Genius, it worked! Thanks, saved a lot of time.