I want to be able to tell the server my model’s orientation so it can in turn send it back to all other players. However getting values through shared memory(which at worst take byte values, at best integer).
Is there a mathematical way I can check my model’s rotation, convert it to a degree value off of a default and then send that 1-360 degree value to the server rather than trying to send 16 float values of the entire matrix structure?
Sending the 16 floats racks me up to 120 somethin’ extra shared memory files with all players involved. Not really the best practice. Any insight?
Would it be feasible convert the rotation matrix to a quaternion?
This would cut down from sending the whole matrix to sending a single vector and rotation around that vector.
XNA has a quaternion structure ( http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.quaternion.aspx ) which contains the method: Quaternion.CreateFromRotationMatrix which takes a rotational matrix.
This will generate the ijk quaternion with the W component as the rotation theta around this axis.