Skip to content
lsl.devlsl.devLSL Dev

LlGetGeometricCenter

Looking for the current API? Open the llGetGeometricCenter reference →

Caveats

The "geometric center" is different from the "center" in viewer's build tools and also different from what llRezObject considers to be the "center" of a linkset.

Examples

default
{
    touch_start(integer total_number)
    {
        llOwnerSay("Geometric center of the object relative to the root prim: " + (string)llGetGeometricCenter());
    }
}

Notes

  • The "geometric center" is the average of all linked prim centers. Mathematically, it's the root-relative positions of all linked prims in the linkset added together and divided by the number of prims in the linkset.

See also: functions

Known issues

  • SVC-6579: Provide better llGetGeometricCenter function.
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.