Model:getCenter

Edit

Returns the center of the Model's axis-aligned bounding box, relative to the Model's origin.




Get the center of the whole Model.

Arguments

None

Returns

NameTypeDescription
xnumber The x coordinate of the center of the bounding box.
ynumber The y coordinate of the center of the bounding box.
znumber The z coordinate of the center of the bounding box.

Get the center of a single mesh in the Model.

Arguments

NameTypeDescription
meshnumber The mesh to get the dimensions of.

Returns

NameTypeDescription
xnumber The x coordinate of the center of the bounding box.
ynumber The y coordinate of the center of the bounding box.
znumber The z coordinate of the center of the bounding box.

Get the center of a single part of a mesh in the Model.

Arguments

NameTypeDescription
meshnumber The mesh to get the dimensions of.
partnumber The part to get the dimensions of.

Returns

NameTypeDescription
xnumber The x coordinate of the center of the bounding box.
ynumber The y coordinate of the center of the bounding box.
znumber The z coordinate of the center of the bounding box.

See also