Player Hierarchy

Why are the capsule and sprite render objects nested as children under the player object, instead of being directly on the object as components? Specifically the rationale for removing the capsule collider from the capsule object, and placing it onto the player, effectively leaving just a capsule mesh and renderer on the capsule object. In the same way, why is the sprite renderer component placed onto the player object as a child object, instead of directly on the player as a component? Is there

It’s customary to do it this way because your player will not always be a capsule, or a single sprite. This allows you to change the capsule to an actual player sprite without affecting anything else. It also allows us to move the sprites around and arrange them in the way it should be. You may find that most of the courses here does that and it’s a practice you will greatly benefit from if you adopt it sooner, rather than later.

That’s exactly it, interchangeability. Eventually, as you add characters, all you have to do is swap out the GameObjects with the images.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms