Don't click here unless you want to be banned.

LSL Wiki : llGroundNormal

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawling22.us.archive.org
vector llGroundNormal(vector offset);

Returns the normal vector to the ground at the object's position + offset.

The normal vector is orthogonal (perpendicular) to the surface of the ground and is always orthogonal to llGroundSlope.

For example, on a perfectly flat, level area of land, the ground normal would be <0,0,1> (straight up; the z-axis).

Compare to llGroundContour and llGroundSlope.

*this is offset isn't local?! ....data indicates that!;

Functions | Simulator
Comments [Hide comments/form]
I found this method returns vectors of the form <x,y,1>. For example, a very slight slope might be <0.05,-0.1,1.0>. Note: this is not a unit vector!

To find out the deviation of the land from vertical, you can say:

vector normalV = llGroundNormal(<0,0,0>);
normalV = llVecNorm(normalV); force to unit length
float degreesFromVertical = llAcos(normalV * <0,0,1>) * 57.29577951;
-- DavanCamus (2005-11-03 10:48:58)


Closing italics.
-- DolusNaumova (2005-11-03 11:02:29)
Attach a comment to this page: