Hi, i have a code to calculate the distance from one object to another, but not sure if this is in meters or what, how can i make this in meters to get an accurate calculation with all my objects?
Thanks!
…this is the code:
var other : Transform;
if (other) {
var dist = Vector3.Distance(other.position, transform.position);
print ("Distance to other: " + dist);
}
…and if the distance its messured from the origin of the object to the origin of the other object, how about to calculate from the collide side to the collide side of the other object for example?, just guessing…perhaps the better way its using raycast?..