diff options
author | Erwin Coumans <blender@erwincoumans.com> | 2006-12-18 10:51:12 +0300 |
---|---|---|
committer | Erwin Coumans <blender@erwincoumans.com> | 2006-12-18 10:51:12 +0300 |
commit | 0e6518731f867be7322579ec7dd170f4d9a685d8 (patch) | |
tree | 7130c298401011d8f6578552708b8afeefc1ded8 /source/gameengine/Converter | |
parent | abda07819627e327023b2d4012e75f433eb02ca4 (diff) |
Use degrees instead of radians for rigidbody constraint axis (euler angles). Radians can't specifiy 90-degree angles precisely, the input is only 3 decimals accurate...
Diffstat (limited to 'source/gameengine/Converter')
-rw-r--r-- | source/gameengine/Converter/BL_BlenderDataConversion.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index b4aba955694..2469a29a294 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -2012,11 +2012,13 @@ void BL_ConvertBlenderObjects(struct Main* maggie, if (gameobj->GetPhysicsController()) { + float radsPerDeg = 6.283185307179586232f / 360.f; + PHY_IPhysicsController* physctrl = (PHY_IPhysicsController*) gameobj->GetPhysicsController()->GetUserData(); //we need to pass a full constraint frame, not just axis //localConstraintFrameBasis - MT_Matrix3x3 localCFrame(MT_Vector3(dat->axX,dat->axY,dat->axZ)); + MT_Matrix3x3 localCFrame(MT_Vector3(radsPerDeg*dat->axX,radsPerDeg*dat->axY,radsPerDeg*dat->axZ)); MT_Vector3 axis0 = localCFrame.getColumn(0); MT_Vector3 axis1 = localCFrame.getColumn(1); MT_Vector3 axis2 = localCFrame.getColumn(2); |