Difference between revisions of "LlGetCenterOfMass"

From Second Life Wiki
Jump to navigation Jump to search
(deeper understanding)
Line 8: Line 8:
|func_footnote=If called from a child prim, the child's center of mass is returned instead (but still in region coordinates).
|func_footnote=If called from a child prim, the child's center of mass is returned instead (but still in region coordinates).
|spec
|spec
|caveats=Works in '''physical objects only'''.
|caveats=* Works in '''physical objects only'''.
In non-physical objects Center Of Mass is not computed.
** In non-physical objects Center Of Mass is not computed.
Either the last computed ''value'' or llGetPos() is returned.
** Either the last computed ''value'' or llGetPos() is returned.
The ''value'' is stored as a prim property, that will only change when Center Of Mass is computed.
** The ''value'' is stored as a prim property and will only change when Center Of Mass is computed.
The ''value'' is not changed by script reset or deletion.
** The ''value'' is not changed by script reset or deletion.
|constants
|constants
|examples
|examples

Revision as of 05:18, 3 December 2010

Summary

Function: vector llGetCenterOfMass( );

Returns the vector position of the object's center of mass in region coordinates.

If called from a child prim, the child's center of mass is returned instead (but still in region coordinates).

Caveats

  • Works in physical objects only.
    • In non-physical objects Center Of Mass is not computed.
    • Either the last computed value or llGetPos() is returned.
    • The value is stored as a prim property and will only change when Center Of Mass is computed.
    • The value is not changed by script reset or deletion.
All Issues ~ Search JIRA for related Bugs

Examples

See Also

Functions

•  llGetPos
•  llGetGeometricCenter

Deep Notes

Search JIRA for related Issues

Signature

function vector llGetCenterOfMass();