Understanding object Hierarchies
Some complex objects may need to be separated into sub-objects, each one with its own components. Those sub-objects need to be somehow attached to the main object and work together to create the necessary object behavior.In this section, we will cover the following concepts related to objects:
- Parenting of objects
- Possible uses
Let's start by discovering how to create a parent-child relationship between objects.
Parenting of objects
Parenting consists of making an object the child of another, meaning that those objects will be related to each other. One type of relationship that happens is a Transform relationship, meaning that a child object will be affected by the parent's Transform. In simple terms, the child object will follow the parent, as if it is attached to it. For example, imagine a player with a hat on their head. The hat can be a child of the player's head, making the hat follow the head while they are attached.In order to...