--- trunk/SHAPES/RigidBody.cpp 2004/06/23 20:28:39 1288 +++ trunk/SHAPES/RigidBody.cpp 2004/06/23 23:19:43 1292 @@ -318,6 +318,7 @@ void RigidBody::calcRefCoords( ) { pAxisMat[i][0] = sU[i][maxAxis]; } + //calculate the proper rotation matrix transposeMat3(pAxisMat, pAxisRotMat); @@ -330,6 +331,14 @@ void RigidBody::calcRefCoords( ) { identityMat3(iMat); setA(iMat); + + //and resort the moments of intertia to match the new orientation + for (i=0; i<3; i++) + if (evals[i]