mirror of
https://github.com/bulletphysics/bullet3
synced 2025-01-18 21:10:05 +00:00
expose pybullet.setPhysicsEngineParameter(numSubSteps=int)
This commit is contained in:
parent
e20c487e52
commit
024ab6725b
@ -425,15 +425,16 @@ static PyObject* pybullet_setPhysicsEngineParameter(PyObject* self, PyObject* ar
|
||||
int numSolverIterations = -1;
|
||||
int useSplitImpulse = -1;
|
||||
double splitImpulsePenetrationThreshold = -1;
|
||||
int numSubSteps = -1;
|
||||
|
||||
if (0 == sm) {
|
||||
PyErr_SetString(SpamError, "Not connected to physics server.");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static char *kwlist[] = { "fixedTimeStep", "numSolverIterations","useSplitImpulse","splitImpulsePenetrationThreshold", NULL };
|
||||
static char *kwlist[] = { "fixedTimeStep", "numSolverIterations","useSplitImpulse","splitImpulsePenetrationThreshold", "numSubSteps", NULL };
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, keywds, "|diid", kwlist,&fixedTimeStep,&numSolverIterations,&useSplitImpulse,&splitImpulsePenetrationThreshold))
|
||||
if (!PyArg_ParseTupleAndKeywords(args, keywds, "|diidi", kwlist,&fixedTimeStep,&numSolverIterations,&useSplitImpulse,&splitImpulsePenetrationThreshold,&numSubSteps))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@ -445,6 +446,10 @@ static PyObject* pybullet_setPhysicsEngineParameter(PyObject* self, PyObject* ar
|
||||
{
|
||||
b3PhysicsParamSetNumSolverIterations(command, numSolverIterations);
|
||||
}
|
||||
if (numSubSteps >= 0)
|
||||
{
|
||||
b3PhysicsParamSetNumSubSteps(command, numSubSteps);
|
||||
}
|
||||
if (fixedTimeStep >= 0)
|
||||
{
|
||||
b3PhysicsParamSetTimeStep(command, fixedTimeStep);
|
||||
|
Loading…
Reference in New Issue
Block a user