Difference between revisions of "LlGetBoundingBox"

From Second Life Wiki
Jump to: navigation, search
m
m (Corrected "relative to it's" to possessive "its")
Line 5: Line 5:
 
|func_footnote=The bounding box is for the entire link set, not just the requested prim.
 
|func_footnote=The bounding box is for the entire link set, not just the requested prim.
 
|func_desc
 
|func_desc
|return_text=that is the bounding box of '''object''' relative to it's root prim.<br/>Format: [ (vector) min_corner, (vector) max_corner ]
+
|return_text=that is the bounding box of '''object''' relative to its root prim.<br/>Format: [ (vector) min_corner, (vector) max_corner ]
 
|spec
 
|spec
 
|caveats
 
|caveats

Revision as of 21:39, 27 June 2008

Summary

Function: list llGetBoundingBox( key object );

Returns a list that is the bounding box of object relative to its 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.

Examples

<lsl>default//An avatar bounding box ruler thingy {

   state_entry()
   {
       llSetStatus(STATUS_PHANTOM, TRUE);
   }
   
   touch_start(integer total_number)
   {
       key target = llDetectedKey(0);
       list box = llGetBoundingBox(target);
       vector center = (llList2Vector(box, 0) + llList2Vector(box, 1)) * 0.5;
       vector size = llList2Vector(box, 1) - llList2Vector(box, 0);
       llSetPrimitiveParams([PRIM_POSITION, center, PRIM_SIZE, size]);
       llSetText("Name: " + llDetectedName(0) + ", UUID: " + (string)target + 
               "\nBounding Box Size: " + (string)size, <1.0, 1.0, 1.0>, 1.0);
   }
}</lsl>

See Also

Functions

•  llGetAgentSize

Deep Notes

Search JIRA for related Issues

Signature

function list llGetBoundingBox( key object );