Sending rotate data over the network.

Hi Everyone,

I have just completed this tutorial series:

Now i think i have a slight understanding of networking… what i am struggling to do is send rotation information over the network. :face_with_spiral_eyes:

If I wanted to send the rotation details or if i wanted to send the entire Transform information of an object how would i do this?

Also can you send constant force details?

I am trying to make an Authoritative Server that accepts the position, rotation and constant force details of an object.

If someone can kindly advise i would be obliged.

Thanks,

J.

Send the quaternion of the transform you want rotated over the network.

Is this what i want to do ?

Close, what you did was send a Quaternion that has nothing to do with the transform, what you want to do is this:

Quaternion rot = transform.rotation;
stream.Serialize(ref rot);

Thanks Khopcraft this worked a treat !!!

I also just fixed another problem where it was only updating on the server side.

I realised that the Network View of the player object was set to “Off” I have changed this to “Unreliable” and the client and the server states are maintained.

Thank you for your help !