BGE fix: complement to recent patch for Rigid Body Constraint. patch by Juha Mäki-Kanto (kanttori)
This commit is contained in:
parent
fa42cf671a
commit
12f77ddb9e
@ -2658,8 +2658,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
|
||||
|
||||
for (dof=3;dof<6;dof++)
|
||||
{
|
||||
// flag only applies to angular limit x
|
||||
if(dof != 3 || dat->flag & dofbit)
|
||||
if(dat->flag & dofbit)
|
||||
{
|
||||
kxscene->GetPhysicsEnvironment()->setConstraintParam(constraintId,dof,dat->minLimit[dof],dat->maxLimit[dof]);
|
||||
}
|
||||
|
@ -2001,7 +2001,10 @@ void CcdPhysicsEnvironment::setConstraintParam(int constraintId,int param,float
|
||||
{
|
||||
//param = 3,4,5 are constraint limits, high limit values
|
||||
btConeTwistConstraint* coneTwist = (btConeTwistConstraint*)typedConstraint;
|
||||
coneTwist->setLimit(param,value1);
|
||||
if(value1<0.0f)
|
||||
coneTwist->setLimit(param,btScalar(BT_LARGE_FLOAT));
|
||||
else
|
||||
coneTwist->setLimit(param,value1);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user