I have a character with a head controlled by a Mouse look script that only affects the
vertical rotation at a total of 180 degrees.
Altough I can not seem to figure out how to synchronize this over the network I have
established.
If you use OnSerializeNetworkView make sure your networkview is observing the script that contains the function. All you should synchronise is the angle, nothing more. Just rotate the mesh the same way as on the “owner” pc.
I made it work by adding a networkview on my player to observe the script for the rotation
RPC (which was also on the player)
as well as the networkview for the player transform.
then i added a networkview for the head transform
(not the bone controlling the transform itself)
HEAD = gameObject.Find("BodyController").Find("SpineTop").Find("Neck").Find("Head")
GameObject.Find is a static function, so all this line does is find the first object in the whole hierarchy named “Head”. What you want is Transform.Find, which you could use like that:
HEAD = transform.Find("BodyController").Find("SpineTop").Find("Neck").Find("Head").gameObject
But more correctly like this:
HEAD = transform.Find("BodyController/SpineTop/Neck/Head").gameObject
Yes, this is probably not an answer to your whole problem, but I hope it saves you a future headache (when suddenly everything breaks when you have more than one Head in the entire game).