"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Calculate distance between two objects

Hello,

Can you please tell me how to calculate distance between two objects that are on the ground plane.

I have tried with transform.position but something is not working well ie. it is crashing my text object.

 

Best regards

Hey there,

 

Usually you'd use Vector3.Distance to calculate the distance between two vectors: https://docs.unity3d.com/ScriptReference/Vector3.Distance.html

 

Kind regards,

Patrick Scheper