# llGetGeometricCenter

*LSL function*

```lsl
vector vector llGetGeometricCenter();
```

- Returns: `vector`
- Energy: 10

Returns a vector representing the geometric center of the object relative to its root prim.

```lsl title="How to use" frame="terminal"
vector result = llGetGeometricCenter();
```

## Caveats

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

## Examples

<details open>
<summary>Example 1</summary>

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

</details>

## 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.

## Known issues

- [SVC-6579](https://jira.secondlife.com/browse/SVC-6579): Provide better `llGetGeometricCenter` function.

## See also

### Functions

- [llGetCenterOfMass](/functions/llGetCenterOfMass/)

---

*Source: [LlGetGeometricCenter](https://wiki.secondlife.com/wiki/LlGetGeometricCenter) on the Second Life Wiki. Content from the Second Life Wiki article LlGetGeometricCenter (revision 1214305, 2023-08-12), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/functions/llGetGeometricCenter/
