Skip to content

Body

export type Body = {
    Type: "Body",
    Name: string?,
    Parent: Body?,
    _Children: {Body},
    _Universe: Universe,
    Components: {Component}?,
}
An Object made up of Components that makes up the hierarchy data structure.

Type: "Body"

Identifier used for Comet to recognize the Body.

Name: string?

Optional name used to uniquely identify the body in errors. Defined through the Name special key.

Parent: Body?

Refrence to the body this object is parented to.

DO NOT TOUCH THIS!

Do not directly read or set this value as it will cause errors! Use the Parent() and GetParent() method attached to Comet itself.

Future versions of Comet may make this value private!

_Children: {Body}

Refrence to the bodys parented to this body.

DO NOT TOUCH THIS!

Do not directly read or set this value as it will cause errors! Use the Parent() and GetChildren() methods attached to Comet itself.

_Universe: Universe

A refrence to this Bodys universe.

DO NOT TOUCH THIS!

Do not read or set this value EVER! This is purely for internal use.

Components: {Component}?

A list of all the components added to the body.

Probably dont touch this

While its safe to use this value. Its recomended to use the GetComponent() and GetComponents() methods attached to Comet itself to increase code clarity.

Future versions of Comet may make this value private!