© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
C. HardmanGame Programming with Unity and C#https://doi.org/10.1007/978-1-4842-9720-9_4

4. Parents and Their Children

Casey Hardman1  
(1)
West Palm Beach, FL, USA
 

Now that we have our floor set up, let’s dive into some very important concepts employed by game engines. Unity allows us to attach individual GameObjects to each other in a system known as “parenting,” where “children” are attached to a “parent” GameObject and thus move, rotate, and scale with it. This creates a distinction between two ways of looking at an object’s position: its world position, which resembles where it is in the scene, and its local position, which resembles where it is in relation ...

Get Game Programming with Unity and C#: A Complete Beginner’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.