|Topic was automatically imported from the old Question2Answer platform.
I am working in C# and am encountering a scenario where I need to set the layer/mask on a Node that could be a Area2D or a KinematicBody2D. Their common ancestor is CollisionObject2D, but I was surprised to find this class does not have a CollisionLayer or CollisionMask property. Turns out Area2D has it, and PhysicsBody2D has it, the only 2 classes that inherit from it. Is the engine duplicating code in these child classes? I can handle my scenario with extra functions, casting conditionals, etc, but it’s dirty. Would be much easier if these classes could be combined, is there an active issue for this?