Godot Version
4.2 and 4.3 RC1
Question
tl;dr: Is there a way to have multiplayerspawner spawn nodes further down the scene tree?
Longer version: I’m making a spaceship game (X series, Elite, Freelancer, etc) with dedicated server multiplayer, so I need the client to be able to hotjoin a game. Multiple, independent star systems are running in different subviewports in order to have separate physics worlds. Players, and npc, can transfer to other craft, or even multiple players on one craft.
My hope is to have both spacecraft and pilots use the magic of the multiplayerspawner. My initial design plan was to parent the “Pilot” nodes to whatever ship that character is currently on. However MultiplayerSpawner will only network the node if it is a direct child of the node MultiplayerSpawner is watching, so the pilot nodes do not propagate to the clients.
My current workaround is that each star system will have a Pilots and Ships node that the Ship and Pilot Spawners will watch. Each pilot and ship will have a variable that references the ship they are on, or who is on that ship. Then I’ll have to reparent, or destroy and recreate, the ships and pilots if they jump to another star system.
I am wondering if there is a way to get a spawner to watch a bigger section of the scene graph, or if there is a more elegant way for me to design this. Thanks for any feedback!