3D Lingo Dictionary > O-S > rootNode |  |

rootNode

Syntax

    member(whichCastmember).camera(whichCamera).rootNode
    sprite(whichSprite).camera.rootNode

Description

3D property; allows you to get or set which objects are visible within a sprite. When a camera is first created, it shows all nodes within the world. The `rootNode` property allows you to modify this by creating a different default view that limits what's shown to a particular node and its children.

For example, light C is a child of model A., if you set the `rootNode` property to `camera("defaultView").rootNode=model(A)`, the sprite will show only model A as illuminated by light C. The default is `group("world")`, meaning that all nodes are used.

Example

This statement sets the `rootNode` of the camera of sprite 5 to the model Pluto. Only Pluto and its children will be visible in sprite 5.

    sprite(5).camera.rootNode = member("Scene").model("Pluto")