Greetings comrades,
I’d like some advice on how to fix a long standing bug.
I’ve setup my player, as follows, with a Rigidbody2D and a NetworkTransform using Sync Rigidbody 2D however, the child objects of the Player do not have a Rigidbody2D or a NetworkTransform.
Player → Rigidbody2D, NetworkTransform
Child
Child
Child
After a client connects, this works fine and the rotation of the Player is synced and the children pivot around the Player position as expected. However, any rotation that occurs on a Player prior to new client connecting is not synced on the child objects. This results in a jumbled mess as follows:
I would really like to avoid adding NetworkTransform components to the children as their is likely to be a significant number of them. I thought perhaps that the children could have a NetworkTransform with a send rate of 0 and a sync event be executed manually but I don’t really understand how to use:
InvokeSyncEvent(int cmdHash, Networking.NetworkReader reader);
Is my best option to create a sync var for the rotation on each child object? This doesn’t seem like a very good solution as the rotation only needs to be synced once on client connect.
Apologies if I’ve missed something obvious. Thank you.