Difference between revisions of "Object Size"
Jump to navigation
Jump to search
(Created page with '{{LSL Header}} ==Object Size== Reports the dimensions and footprint of a linkset. <lsl> default { state_entry() { float temp; list box = llGetBounding...') |
(No difference)
|
Revision as of 17:44, 18 October 2009
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Object Size
Reports the dimensions and footprint of a linkset.
<lsl> default {
state_entry() { float temp;
list box = llGetBoundingBox(llGetKey()); vector size = llList2Vector(box, 1) * llGetRot() - llList2Vector(box, 0) * llGetRot();
if (llAbs(llRound(size.x)) < llAbs(llRound(size.y))) { float temp = size.y; size.y = size.x; size.x = temp; } llOwnerSay("Your object is roughly " + (string)llAbs(llRound(size.x)) + "m long by " + (string)llAbs(llRound(size.y)) + "m wide by " + (string)llAbs(llRound(size.z)) + "m tall."); llOwnerSay("With an area of " + (string)llAbs(llRound(size.x*size.y))); llRemoveInventory(llGetScriptName()); }
}
</lsl>