From Second Life Wiki
Revision as of 15:11, 17 November 2022 by Signal Linden (talk | contribs) (Replace Template:SourceLink/bitbucket with SourceLink:github)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Function: vector llGetAgentSize( key avatar );

Returns a vector that is an estimated size of the requested avatar.

• key avatar avatar UUID that is in the same region

ZERO_VECTOR is returned if avatar is not in the region or if it is not an avatar.


  • The returned vector is an estimate calculated from the avatar's current shape including shoes. x is a constant 0.45[1], y is a constant 0.60[2], z is the approximate total height of all avatar's bones, with an arbitrary amount added or subtracted based on the current shape's "Hover" setting. Reported height is constrained to the range 1.1 to 2.45 meters, and does not include animation or mesh bone offsets. [3]
    • Due to the shape Hover setting, and mesh and animation offsets, it is not possible to use this function to determine the rendered height of an avatar with any degree of confidence.
  • As of Second Life Server, the return value is the avatar's reported bounding box - <0.1, 0.1, 0.2> when standing. (Avatar bounding boxes have historically been redefined with major physics upgrades.) An avatar's bounding box changes when an avatar sits, while llGetAgentSize is constant for as long as the shape does not change.
All Issues ~ Search JIRA for related Bugs


//A simple script that makes a box hover above the owner's head.
        key    owner = llGetOwner();
        vector pos   = llList2Vector(llGetObjectDetails(owner, [OBJECT_POS]), 0);
        vector agent = llGetAgentSize(owner);

    //  "pos" needs to be adjusted so it appears above the owner.
        pos.z += 0.5 + agent.z / 2;

    //  makes sure it found the owner, a zero vector evaluates as false

    touch_start(integer num)


  • This function is a good way to quickly test...
    • if an avatar is in the same region.
    • if a UUID known to be in the region is an avatar.

To use this function to test either case use as follows

if(llGetAgentSize(uuid)) {
    //uuid is an avatar in the region
} else {
    //uuid is not an avatar in the region
vector agentSize = llGetAgentSize(uuid);
if (agentSize.z == 1.9) {
    // avatar is probably Ruthed

See Also


•  llGetObjectDetails
•  llGetBoundingBox
•  llGetAgentInfo
•  llRequestAgentData


•  Avatar body size

Deep Notes

Search JIRA for related Issues



function vector llGetAgentSize( key avatar );


For height (minus head)
Or to tell if you're not there.
Do not hope for "size".

I just wanted size.
It gave me something useless.
How hard can it be?