Difference between revisions of "LlGroundNormal"
Jump to navigation
Jump to search
m (changed the caveat to say "unit normal" instead of just normal) |
Void Singer (talk | contribs) m (corrected Caveat to Note) |
||
Line 14: | Line 14: | ||
} | } | ||
</lsl> | </lsl> | ||
|caveats | |caveats | ||
|constants | |constants | ||
|examples | |examples | ||
Line 24: | Line 24: | ||
|also_events | |also_events | ||
|also_articles | |also_articles | ||
|notes | |notes= | ||
*There seems to some confusion be between a [http://en.wikipedia.org/wiki/Normal_%28geometry%29 Surface Normal] (the direction from the surface) and [http://en.wikipedia.org/wiki/Unit_vector Normalized Vector] (a vector with a magnitude of 1.0, AKA Unit Vector). This function does '''not''' return a unit vector. Surface normals may encode additional information in the magnitude of the vector.if you need a Unit Vector, simply use [[llVecNorm]]. | |||
|cat1=Ground | |cat1=Ground | ||
|cat2=Region | |cat2=Region |
Revision as of 04:04, 16 June 2012
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: vector llGroundNormal( vector offset );222 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Returns a vector that is the ground normal from the current position + offset.
• vector | offset |
The requested position needs to be in the same sim.
Specification
This function is defined as: <lsl> vector llGroundNormal(vector offset) {
vector slope = llGroundSlope(offset); return <slope.x, slope.y, 1.0>;
} </lsl>
Caveats
Examples
Notes
- There seems to some confusion be between a Surface Normal (the direction from the surface) and Normalized Vector (a vector with a magnitude of 1.0, AKA Unit Vector). This function does not return a unit vector. Surface normals may encode additional information in the magnitude of the vector.if you need a Unit Vector, simply use llVecNorm.
See Also
Functions
• | llGround | – | Gets the ground height | |
• | llGroundContour | – | Gets the ground contour | |
• | llGroundSlope | – | Gets the ground slope |