Fabrice,

  Actually, you don't need to worry about the math.  Try this:

(model1.transform.position-model2.transform.position).magnitude

  subtracting one model's position from the other's will give you a vector
describing how far apart the two models are (or at least the two models
registration points).  The .magnitude property of the vector will give you
the length of that vector, which in this case would be the distance between
the models.

  Hope that helps!

  Brian Robbins
  [EMAIL PROTECTED]
  Senior Software Engineer, CleverMedia
  http://www.CleverMedia.com/


> How do you calculate distance beetween 2 3d points? Whats the formula?
>
> Fabrice


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to