p
poddo

Course vs ObstacleCourse for collision

Might not matter but is there a reason we created the collision shape on the obstaclecourse scene with the instance of the course on it, instead of on the course scene directly?  I can't imagine using the course scene without the boundaries. I'm sure it doesn't really "matter" but was just curious.

  • FATNUT replied

    I'd say it's a seperation of concerns and adds structure.
    The collision to keep the player in the course is literally 'outside' the course, so you won't have a super long StaticBody node in your level with +10 children or more in your scene tree.

    Yes, you could put it directly on the Course, but mind the collision layers and structure of your game.

    Example:
    Green are all the nodes 'physically inside' the game world, while
    Red are the nodes that represent the boundaries / outer walls.

  • Nathan Lovato replied

    The reason is just that we provide the level but you have to make the collision shape yourself.

    We keep working in the obstacle course scene as much as possible because there are lots of concepts we need to look at and we don't want to concern ourselves too much with the hypothetical structure you would follow in a real game project. The node structure changes a lot depending on the specifics of your project in practice.

    1 love