p
pieq

Collision info is different between original Godot object and its instances

Hello!

In the practice, I noticed the instance of the Godot object in the gem counter scene also has a Collision panel, but the values there do not match the ones in the Godot.tscn object.




I tried to instantiate another Godot in the scene, and it's the same: the instances' Collision panel is set to collision layer 1, and no collision mask. I'm confused. How do you know you have to go into the original object to check for those? And does it mean the information in the instance's collision panel are meaningless?

  • Nathan Lovato replied

    The collision settings on individual instances override the values from the source scene. So they are not meaningless.

    As far as knowing that you have to open the scene it's generally in the instructions:


    But we are aware that it's easy to miss one instruction. We're looking for ways to improve the practices as we remake the course for Godot 4. We want more interactivity and contextual feedback, but the budget is still a bottleneck, especially with the breadth of topics we have to cover to fulfill our promise of teaching people how to code.

    2 loves
  • p
    pieq replied

    Hello Nathan and thanks for the answer!

    When I wrote "How do you know you have to go into the original object to check for those?", I meant in general, not necessarily in the context of this exercise.

    If I develop a game and I instantiate one of the source object, I would go to the instance's collision panel to check its values. However, for this exercise at least, we end up having to modify the source object's collision values. I'm still not sure to understand :)

  • Nathan Lovato replied

    I see!

    Then I would say you generally want to modify the source because it will affect every instance and be the default value for every new instance you create ( be it in the editor or via code).

    Modifying the properties of an instance overrides the default values defined in the source scene. So you want to modify the properties of one instance when you want this instance to have unique values.