By fizar321
on Wed, 08/25/2021 - 15:03
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,
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