Date: Tue, 13 Nov 2001 01:53:51 -0700 Thank you Brian, this will make the trick!! Now something else, this script calculate the distance beetween 2 points considering the 3 axis at one time. And i can really use it, but i need also a little variant of it.
How do you manage when you need the same calculation, but only to compare one axis to the same other? Let's say you have one point at 0,0,0 and the other at 0,0,5, the distance is the same using your script when the other is at 0,0,-5. But in case the game shows a door, you are or front top under or rear of it for an equal distance beetween 2. How do you manage, since i come from Flash, a formula as this one would be usefull. (model1.transform._z.position-model2.transform._z.position).magnitude what's the equivalent syntax in Director? Fabrice From: "Brian Robbins" <[EMAIL PROTECTED]> Subject: RE: <lingo-l> Position calculation help... 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!] -- Zuidzijde reclamebureau http://www.zuidzijde.nl [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!]
