So I've been making this online survival game using mirror and I have come across an issue with spawning in a weapon for the player.
Apparently you can only parent an object to another networked object (when executed by the server).
When I was doing this in single player I had no issues obviously as I could just set the parent to my camera holder game object and it will follow the cameras rotations as expected.
Now for the client to see the other players spawned equippable, I can only seem to set the parent of the equippable to the player transform where the network Identity/transform is.
If I go to set it to the camera holder then nothing happens, the equippable will just spawn in at 0,0,0.
So with this said, is this the only way to do this? Have a ClientRpc tell the client to parent the equippable to the root of the player and then have code on the equippable to follow the camera?
I feel like I'm missing something important as this method seems quite finniky.
Thanks in advance.
I have tried putting another network transform on the gameobject I would like the parent to be set.. mirror doesn't like this, was hoping it would parent but it just goes to 0,0,0
I have tried to code moving the equippable with the camera but I wasn't getting good results so I thought I would ask here if there was a much easier and or practical way to execute this.