LlGetBoundingBox

From Second Life Wiki

Jump to: navigation, search

Template:Needs Translation/LSL/de Template:Needs Translation/LSL/es Template:Needs Translation/LSL/el Template:Needs Translation/LSL/he Template:Needs Translation/LSL/it Template:Needs Translation/LSL/ko Template:Needs Translation/LSL/nl Template:Needs Translation/LSL/hu Template:Needs Translation/LSL/no Template:Needs Translation/LSL/da Template:Needs Translation/LSL/sv Template:Needs Translation/LSL/tr Template:Needs Translation/LSL/pl Template:Needs Translation/LSL/pt Template:Needs Translation/LSL/ru Template:Needs Translation/LSL/uk Template:Needs Translation/LSL/zh-Hans Template:Needs Translation/LSL/zh-Hant

Contents

Summary

Function: list llGetBoundingBox( key object );
277 Function ID
0.0 Delay
10.0 Energy

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

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);
    }
}

See Also

Functions

•  llGetAgentSize

Deep Notes

This article wasn't helpful for you? Maybe the related article at the LSL Wiki is able to bring enlightenment.
Personal tools
In other languages