physics_assembler
A physics assembler. Reports whether the host sub-level is assembled and exposes its mass, center of mass, and inertia tensor.
| isAssembled() | Check whether the host sub-level is currently assembled. |
|---|---|
| getMass() | Get the assembled sub-level's total mass. |
| getCenterOfMass() | Get the assembled sub-level's center of mass. |
| getInertiaTensor() | Get the assembled sub-level's inertia tensor. |
| getSubLevelId() | Get the UUID of the sub-level this assembler belongs to, or nil if the assembler isn't currently sitting on a sub-level (e. |
| getSubLevelName() | Get the display name of the sub-level this assembler belongs to, or nil if there's no sub-level or the sub-level has no name set. |
- isAssembled()Source
Check whether the host sub-level is currently assembled.
Returns
booleanTrue if assembled.
- getMass()Source
Get the assembled sub-level's total mass.
Returns
numberThe mass, or 0 if not assembled.
- getCenterOfMass()Source
Get the assembled sub-level's center of mass.
Returns
- {
number... } A three-element list {x, y, z}.
- {
- getInertiaTensor()Source
Get the assembled sub-level's inertia tensor. Row-major 3x3: [Ixx, Ixy, Ixz, Iyx, Iyy, Iyz, Izx, Izy, Izz]. Symmetric, so off-diagonal pairs (Ixy vs Iyx etc.) are equal; ordering between them doesn't matter.
Returns
- {
number... } A nine-element list of tensor entries.
- {
- getSubLevelId()Source
Get the UUID of the sub-level this assembler belongs to, or nil if the assembler isn't currently sitting on a sub-level (e.g. placed on stationary ground). Stable for the life of the contraption.
Returns
stringThe sub-level UUID string, or nil.
- getSubLevelName()Source
Get the display name of the sub-level this assembler belongs to, or nil if there's no sub-level or the sub-level has no name set.
Returns
stringThe sub-level name, or nil.