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

  1. boolean True if assembled.
getMass()Source

Get the assembled sub-level's total mass.

Returns

  1. number The mass, or 0 if not assembled.
getCenterOfMass()Source

Get the assembled sub-level's center of mass.

Returns

  1. { 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

  1. { 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

  1. string The 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

  1. string The sub-level name, or nil.