|
PetGirl Bergman
Fellow Creature:-)
Join date: 16 Feb 2005
Posts: 2,414
|
05-31-2005 22:47
I wonder if there are any easy way to measure the distance between 2 objects placed on land-.- now we talk about 50-100 - 500 meters from each other... IN SL of course..  )) In real I had contacted a land surveyor.
|
|
Jon Marlin
Builder, Coder, RL & SL
Join date: 10 Mar 2005
Posts: 297
|
06-01-2005 06:23
From: PetGirl Bergman I wonder if there are any easy way to measure the distance between 2 objects placed on land-.- now we talk about 50-100 - 500 meters from each other... IN SL of course..  )) In real I had contacted a land surveyor. Well, if they're in the same sim, its pretty much trivial. If you're looking for the distance between two objects at more or less the same height, you can just use the Pythagorean theorem on the difference between the (X,Y) position of each object. For example (get the object's positions in the edit window): Object A: (27, 16, 35) Object B: (218, 135, 35) square root (square (218 - 27) + square (135 - 16)) = 233.6 m If they're not in the same sim, well its a bunch harder. You basically want to translate the local coordinates of the objects into global grid coordinates (there are script functions in LSL that do this). Then the above formula will work. - Jon
|
|
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
|
06-01-2005 17:38
Hmm, what if ObjectA is at the top of a mountain (27, 16, 135), and ObjectB is at the edge of the ocean (218, 135, 1)?
In this case, add the X/Y hypotenuse (233.60m) to the squared difference in altitude (Z-axis). Figure the square root for an actual distance of 269.30m between the two objects placed on uneven land.
To get object positions for your calculations, regardless whether or not they're in the same sime, use llGetRegionCorner() + llGetPos().
|
|
Ghoti Nyak
καλλιστι
Join date: 7 Aug 2004
Posts: 2,078
|
06-02-2005 07:05
Math is hard! *giggle*
I prolly should have paid more attention in class! If only I'd known high school math would be useful in SecondLife!
-Ghoti
_____________________
"Sometimes I believe that this less material life is our truer life, and that our vain presence on the terraqueous globe is itself the secondary or merely virtual phenomenon." ~ H.P. Lovecraft
|
|
PetGirl Bergman
Fellow Creature:-)
Join date: 16 Feb 2005
Posts: 2,414
|
06-02-2005 07:13
No one that can make a ruler or a yardstick to me??
I confess I am bad at mathematics...
|
|
Foulcault Mechanique
Father Cheesemonkey
Join date: 28 Mar 2005
Posts: 557
|
06-02-2005 15:51
Pet there is a builders ruler that you can get. Not sure if it can measure that far as truly I have not used it. If you don't find one 9:30 PM SL time drop me a line and I can send one over. *shameless plug* or just come find me at the building event I'll be hosting at Phoenix's Spa tonight at 10:00 PM
_____________________
Foulcault "Keep telling yourself that and someday you just might believe it." "Every Technomage knows the 14 words that will make someone fall in love with you forever, but she only needed one. "Hello"" Galen from Babylon 5 Crusade From: Jeska Linden I'm moving this over to Off-Topic for further Pez ruminations.
|