Converting transform.rotation to to 16 bit LSB and MSB

would like to convert the transform.rotation value in unity3d to a 16 bit integer MSB/LSB (for adressing a double DMX channel)

Unity3D operates between -180 to 180 for a full 360 degree rotation I need a linear 0 - 65,535 in two bytes MSB /LSB as result.

see also Unity editor rotation accuracy 89.999 etc - Questions & Answers - Unity Discussions

who can help me on this?

Thank you…

@aldonaletto ?

@FortisVenaliter

Could be… but how do I write this?

I have a one ax Y rotating object in unity controlled by a animation in animator.

I send the current Y pos via osc out using (transform.rotation.y) as a float quaternion …

But I need a non signed 16bit value as two separate bytes ranging from 0-255 MSB and 0-255 LSB

for one rotation from 0-360 degrees

It maybe basic… but how do you do it?

Jan