   How to interpolate rotations?
  Hey there.I have the following scenario in a networked 3d environment:An entity on the server has a specific rotation at a specific time, and a snapshot of this rotation is send to a client in fixed intervals. The client should interpolate between these rotation snapshots, as to provide a smooth transition. The rotation of the entity is read as a vector of Euler angles from the underlying graphics/physics lib at the server, and also inserted as a vector of Euler angles at the client.I have tried the following approaches with no success:Using simple LERP as with interpolation of positions did not produce the expected results when more than one axis is rotated at the same time. Is this a general limitation of using LERP or Euler angles in this context? I've read elsewhere that using Quaternions and SLERP is the way to go. However, I've had similar results of only one axis working correctly with Quaternions. Rotations around two axes at the same time do get interpolated correctly sometimes, but the rotation is prone to stuttering and jumping around.For reference, I build the quaternion from euler angles like thispublic Quaternion(float _eulerX, float _eulerY, float _eulerZ){_eulerX *= Maths.DegToRad;_eulerY *= Maths.DegToRad;_eulerZ *= Maths.DegToRad;Quaternion roll_x = new Quaternion((float)Math.Sin( _eulerX * 0.5f ), 0, 0, (float)Math.Cos( _eulerX * 0.5f ) );Quaternion pitch_y = new Quaternion( 0, (float)Math.Sin( _eulerY * 0.5f ), 0, (float)Math.Cos( _eulerY * 0.5f ) );Quaternion yaw_z = new Quaternion( 0, 0, (float)Math.Sin( _eulerZ * 0.5f ), (float)Math.Cos( _eulerZ * 0.5f ) );// order: y * x * zQuaternion this_ = pitch_y * roll_x * yaw_z;x = this_.x;y = this_.y;z = this_.z;w = this_.w;}and read them out again like thispublic Vector3 to_euler(){double sqw = w * w;double sqx = x * x;double sqy = y * y;double sqz = z * z;float rotxrad = (float)Math.Atan2(2.0 * ( y * z + x * w ) , ( -sqx - sqy + sqz + sqw ));float rotyrad = (float)Math.Asin(-2.0 * ( x * z - y * w ));float rotzrad = (float)Math.Atan2(2.0 * ( x * y + z * w ) , (  sqx - sqy - sqz + sqw ));return new Vector3(Maths.RadToDeg * rotxrad, Maths.RadToDeg * rotyrad, Maths.RadToDeg * rotzrad);}Could the order of rotations of the Euler angles be at fault here? Do they have to be the same as with the underlying graphics/physics lib (which I don't actually know)?Maybe my approaches are wrong to begin with, and I'd be grateful if someone could point me in the right direction.Thanks in advance.Mfg Imp   
  Order of operations for the Euler angles is extremely important as the end result will vary if the order is changed (e.g., rotations are not commutative). So you have to be consistent across all of your libraries.With respect to actually doing the interpolation, not sure how you're doing your LERP, but with quaternions you do want do to a spherical LERP, slerp. You did mention that in your original message, but you also used just "LERP" so I'm not sure what you're actually doing.The following two references from Dave Eberly talk about this in some detail:Rotation Representations and Performance IssuesKey Frame Interpolation via Splines and QuaternionsHope that helps!