Print the tree: what the scene inspector shows
A small recursive function prints names and types. The two tyres share one geometry and one material: the tree has two tyres, the GPU holds one shape.
Objects form a tree: a parent carries its children. Move, turn or scale the bike and the wheels follow, while each wheel still spins on its own. You learn how local and world positions relate and how to print the tree.
Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.
Ready for more? This phase has 5 hands-on exercises with automatic checks.
Practice questions
Write the code in the editor, run it, then open the model answer to compare.
Build a crank group that holds two pedals 0.17 m on each side of its centre and turns once every 2 seconds.
Print how many objects are below bike in a scene where the bike has two wheels with two meshes each.
Explain it without notes
A wheel is a child of the bike. The bike moves 1 m forward. What are the wheel's local and world positions before and after?
Why does a child turn around its parent's origin and not its own centre? How do you make a part spin about its own centre?
Console
Nothing logged yet.Expected console output
(no name) [Scene]
turntable [Group]
bike [Group]
rear-wheel [Group]
tyre [TorusGeometry]
front-wheel [Group]
tyre [TorusGeometry]
(no name) [AmbientLight]
tyres: 2 | same material: true | same geometry: true