3D Lingo Dictionary > C-D > child |  |

child

Syntax

    member(whichCastmember).model(whichParentNode).child(whichChildNodeName)
    member(whichCastmember).model(whichParentNode).child[index]

Description

3D model, group, light, and camera property; returns the child node named `whichChildNodeName` or at the specified index in the parent node's list of children. A node is a model, group, camera, or light.

The transform of a node is parent-relative. If you change the position of the parent, its children move with it, and their positions relative to the parent are maintained. Changes to the rotation and scale properties of the parent are similarly reflected in its children.

Use the `addChild` method of the parent node or set the `parent` property of the child node to add to the parent's list of children. A child can have only one parent, but a parent can have any number of children. A child can also have children of its own.

Example

This statement shows that the second child of the model named Car is the model named Tire.

    put member("3D").model("Car").child[2]
    -- model("Tire")

See also

`addChild`, `parent`