llGetBoundingBox
Revision as of 14:51, 16 June 2008 by Meyermagic Salome (talk | contribs) (Added an example, although I am not sure if it is the best possible demonstration of the function.)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: list llGetBoundingBox( key object );277 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Returns a list that is the bounding box of object relative to it's root prim.
Format: [ (vector) min_corner, (vector) max_corner ]
• key | object | – | Object or agent in the sim. |
The bounding box is for the entire link set, not just the requested prim.
Caveats
Examples
<lsl>vector min = <1, 1, 1>;
default {
touch_start(integer total_number) { llSensor("", NULL_KEY, PASSIVE, 96.0, PI); }
sensor(integer num_detected) { list box; integer i; for(i; i < num_detected; ++i) { box = llGetBoundingBox(llDetectedKey(i)); if(llVecDist(llList2Vector(box, 0), llList2Vector(box, 1)) > llVecMag(min)) { llOwnerSay(llDetectedName(i) + "'s diagonal is longer than " + (string)llVecMag(min) + " meters."); } } }}</lsl>
See Also
Functions
• | llGetAgentSize |