llGetGeometricCenter
function
Function syntax
vector llGetGeometricCenter();- Returns
vector- Energy
- 10
Returns a vector representing the geometric center of the object relative to its root prim.
vector result = llGetGeometricCenter();Caveats
Section titled “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
Section titled “Examples”Example 1
default{ touch_start(integer total_number) { llOwnerSay("Geometric center of the object relative to the root prim: " + (string)llGetGeometricCenter()); }}- 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
Section titled “Known issues”- SVC-6579: Provide better
llGetGeometricCenterfunction.
See also
Section titled “See also”Functions
Section titled “Functions”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.