Hi.
I have a Hull and a turret that separates during multiplayer session. The hull does what it’s supposed to for everyone, but the turret just sits in the starting location for everyone but the local player.
The turret is a child object of the hull.
Any advice or help is appreciated
If the turret really is a child of the hull (and doesn’t have any scripts directly changing its transform.position), then when the hull moves the turret must move with it.
Either the turret is being un-parented, or something is directly setting its position.
What networking API are you using? How are you moving the turret? Code would help.
As for some ideas, in UNet you can assign the turret as a NetworkTransformChild, make your movements of it on either the server or on the client with authority over the turret, and the movement should propagate. Alternatively after moving on the client that owns this turret, you can call a command on the server, to call a ClientRPC, that tells all clients to move the turret as well.
Well, after having tried multiple solutions and still not gotten it to work, I know where the problem is. I’m not good enough with coding to make a game yet. Will come back to this game when my skills have improved
Thanks for your help and input
I’ve lost count of the amount of times that’s happened to me over the years. It’s not unusual to find that given a few months extra programming knowledge, what was once an insurmountable challenge suddenly seems easy to implement.
Keep plugging away, you’ll get there eventually
Hopefully someday I’ll have no trouble with a small problem like this.
Thanks for the uplifting reply Munchy