Add a minimum solver 'batch' size to avoid solving many small (independent) islands separately
Default size is 128 . Disable feature by using dynamicsWorld->getSolverInfo().m_minimumSolverBatchSize = 1;
This commit is contained in:
@@ -52,6 +52,7 @@ struct btContactSolverInfoData
|
||||
|
||||
int m_solverMode;
|
||||
int m_restingContactRestitutionThreshold;
|
||||
int m_minimumSolverBatchSize;
|
||||
|
||||
|
||||
};
|
||||
@@ -79,6 +80,7 @@ struct btContactSolverInfo : public btContactSolverInfoData
|
||||
m_warmstartingFactor=btScalar(0.85);
|
||||
m_solverMode = SOLVER_USE_WARMSTARTING | SOLVER_SIMD;// | SOLVER_RANDMIZE_ORDER;
|
||||
m_restingContactRestitutionThreshold = 2;//resting contact lifetime threshold to disable restitution
|
||||
m_minimumSolverBatchSize = 128; //try to combine islands until the amount of constraints reaches this limit
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user