I am triying to build "modular" ships in my 2d game, meaning a ship has a hull, an engine, cannons, etc. each being an own scene. A ship could be set up like this
Ship
|- Hull
|- Sprite
|- CollisionShape
|- Engine
|- Sprite
|- CollisionShape
|- ParticleSystem
Now I am stuck with the following problem. I set up the Ship node as KinematicBody2D as I use that node for movement. BUT the collision should come from the sub scenes (Hull, Engine, etc.). So I made them KinematicBodies too and added the CollisionShapes.
However this does not work, as the Ship needs a CollisionShape child (KinematicBody2D) and it being in the nested Scenes (Hull, Engine, etc.) does not suffice. In addition if I move the Ship node with move_and_collide/_slide the child nodes do not collide.
I do not think that my current approach is correct. What can I do to accomplish this without breaking my modularity by moving the children CollisionShapes to the Ship?