bugfixes for generic (experimental) Bullet rigidbody constraint: use cone-twist instead (needs a few more minor fixes)
Note: Visual Studio projectfiles and other buildsystems need to add extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp to the project!
This commit is contained in:
@@ -1353,11 +1353,13 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
|
||||
int offsetY = 150;
|
||||
int textButWidth = ((width/2)-togButWidth);
|
||||
|
||||
uiDefButI(block, MENU, B_CONSTRAINT_TEST, "Joint Types%t|Ball%x1|Hinge%x2|Generic (experimental)%x12",//|Extra Force%x6",
|
||||
uiDefButI(block, MENU, B_CONSTRAINT_TEST, "Joint Types%t|Ball%x1|Hinge%x2|Cone Twist%x4|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)
|
||||
height = 270;
|
||||
if (data->type==CONSTRAINT_RB_CONETWIST)
|
||||
height = 200;
|
||||
|
||||
uiDefBut(block, ROUNDBOX, B_DIFF, "", *xco-10, *yco-height, width+40,height-1, NULL, 5.0, 0.0, 12, rb_col, "");
|
||||
|
||||
@@ -1400,7 +1402,8 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
|
||||
uiDefButBitS(block, TOG, 4, B_CONSTRAINT_TEST, "LinMaxZ", *xco+(width-(textButWidth-5)-togButWidth), *yco-offsetY, togButWidth, 18, &data->flag, 0, 24, 0, 0, "Use maximum z limit");
|
||||
uiDefButF(block, NUM, B_CONSTRAINT_TEST, "", *xco+(width-textButWidth-5), *yco-offsetY, (textButWidth), 18, &(data->maxLimit[2]), -extremeLin, extremeLin, 0.1,0.5,"max z limit");
|
||||
offsetY += 20;
|
||||
|
||||
}
|
||||
if ((data->type==CONSTRAINT_RB_GENERIC6DOF) || (data->type==CONSTRAINT_RB_CONETWIST)) {
|
||||
/* Draw Pairs of LimitToggle+LimitValue */
|
||||
uiBlockBeginAlign(block);
|
||||
uiDefButBitS(block, TOG, 8, B_CONSTRAINT_TEST, "AngMinX", *xco, *yco-offsetY, togButWidth, 18, &data->flag, 0, 24, 0, 0, "Use minimum x limit");
|
||||
|
||||
Reference in New Issue
Block a user