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...

This commit is contained in:
2006-12-18 07:51:12 +00:00
parent abda078196
commit 0e6518731f
4 changed files with 17 additions and 10 deletions

View File

@@ -1152,7 +1152,7 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
int textButWidth = ((width/2)-togButWidth);
uiDefButI(block, MENU, B_CONSTRAINT_TEST, "Joint Types%t|Ball%x1|Hinge%x2|Generic6DOF%x12",//|Extra Force%x6",
uiDefButI(block, MENU, B_CONSTRAINT_TEST, "Joint Types%t|Ball%x1|Hinge%x2|Generic (experimental)%x12",//|Extra Force%x6",
*xco, *yco-25, 150, 18, &data->type, 0, 0, 0, 0, "Choose the joint type");
height = 140;
if (data->type==CONSTRAINT_RB_GENERIC6DOF){
@@ -1165,13 +1165,13 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
uiDefButBitS(block, TOG, CONSTRAINT_DRAW_PIVOT, B_CONSTRAINT_TEST, "ShowPivot", *xco+135, *yco-50, 130, 18, &data->flag, 0, 24, 0, 0, "Show pivot position and rotation");
//if (data->tar)
// uiDefIDPoinBut(block, test_obpoin_but, ID_OB, B_CONSTRAINT_CHANGETARGET, "Child:", *xco+135, *yco-50, 130, 18, &data->child, "Child2 Object (if this exist then this object will be the pivot Only)");
uiDefButF(block, NUM, B_CONSTRAINT_TEST, "Pivot X:", *xco, *yco-75, 130, 18, &data->pivX, -1000, 1000, 0.1, 0.0, "Offset pivot on X");
uiDefButF(block, NUM, B_CONSTRAINT_TEST, "Pivot Y:", *xco, *yco-100, 130, 18, &data->pivY, -1000, 1000, 0.1, 0.0, "Offset pivot on Y");
uiDefButF(block, NUM, B_CONSTRAINT_TEST, "Pivot Z:", *xco, *yco-125, 130, 18, &data->pivZ, -1000, 1000, 0.1, 0.0, "Offset pivot on z");
uiDefButF(block, NUM, B_CONSTRAINT_TEST, "Pivot X:", *xco, *yco-75, 130, 18, &data->pivX, -1000, 1000, 100, 0.0, "Offset pivot on X");
uiDefButF(block, NUM, B_CONSTRAINT_TEST, "Pivot Y:", *xco, *yco-100, 130, 18, &data->pivY, -1000, 1000, 100, 0.0, "Offset pivot on Y");
uiDefButF(block, NUM, B_CONSTRAINT_TEST, "Pivot Z:", *xco, *yco-125, 130, 18, &data->pivZ, -1000, 1000, 100, 0.0, "Offset pivot on z");
uiDefButF(block, NUM, B_CONSTRAINT_TEST, "AxEX:", *xco+135, *yco-75, 130, 18, &data->axX, -3.141592, 3.141592, 0.1, 0.0, "Rotate pivot on X Axis");
uiDefButF(block, NUM, B_CONSTRAINT_TEST, "AxEY:", *xco+135, *yco-100, 130, 18, &data->axY, -3.141592, 3.141592, 0.1, 0.0, "Rotate pivot on Y Axis");
uiDefButF(block, NUM, B_CONSTRAINT_TEST, "AxEZ:", *xco+135, *yco-125, 130, 18, &data->axZ, -3.141592, 3.141592, 0.1, 0.0, "Rotate pivot on Z Axis");
uiDefButF(block, NUM, B_CONSTRAINT_TEST, "Ax X:", *xco+135, *yco-75, 130, 18, &data->axX, -360, 360, 1500, 0.0, "Rotate pivot on X Axis (in degrees)");
uiDefButF(block, NUM, B_CONSTRAINT_TEST, "Ax Y:", *xco+135, *yco-100, 130, 18, &data->axY, -360, 360, 1500, 0.0, "Rotate pivot on Y Axis (in degrees)");
uiDefButF(block, NUM, B_CONSTRAINT_TEST, "Ax Z:", *xco+135, *yco-125, 130, 18, &data->axZ, -360, 360, 1500, 0.0, "Rotate pivot on Z Axis (in degrees)");
if (data->type==CONSTRAINT_RB_GENERIC6DOF){
/* Draw Pairs of LimitToggle+LimitValue */