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 ...
4. Parents and Their Children
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.