diff --git a/examples/ExtendedTutorials/InclinedPlane.cpp b/examples/ExtendedTutorials/InclinedPlane.cpp index 2c36f8ffa..343ebc3ae 100644 --- a/examples/ExtendedTutorials/InclinedPlane.cpp +++ b/examples/ExtendedTutorials/InclinedPlane.cpp @@ -36,6 +36,9 @@ static btScalar gBoxRestitution = 0; // set box restitution to 0 static btScalar gSphereFriction = 1; // set sphere friction to 1 static btScalar gSphereRollingFriction = 1; // set sphere rolling friction to 1 +static btScalar gSphereSpinningFriction = 0.3; // set sphere spinning friction to 0.3 + + static btScalar gSphereRestitution = 0; // set sphere restitution to 0 @@ -149,6 +152,16 @@ void InclinedPlaneExample::initPhysics() m_guiHelper->getParameterInterface()->registerSliderFloatParameter(slider); } + { // create slider to change the sphere rolling friction + SliderParams slider("Sphere Spinning",&gSphereSpinningFriction); + slider.m_minVal=0; + slider.m_maxVal=2; + slider.m_clampToNotches = false; + slider.m_callback = onSphereRestitutionChanged; + m_guiHelper->getParameterInterface()->registerSliderFloatParameter(slider); + } + + { // create slider to change the sphere restitution SliderParams slider("Sphere Restitution",&gSphereRestitution); slider.m_minVal=0; @@ -240,6 +253,8 @@ void InclinedPlaneExample::initPhysics() gSphere->setFriction(gSphereFriction); gSphere->setRestitution(gSphereRestitution); gSphere->setRollingFriction(gSphereRollingFriction); + gSphere->setSpinningFriction(gSphereSpinningFriction); + } m_guiHelper->autogenerateGraphicsObjects(m_dynamicsWorld); diff --git a/examples/pybullet/pybullet.c b/examples/pybullet/pybullet.c index 4738f5ddb..995110b81 100644 --- a/examples/pybullet/pybullet.c +++ b/examples/pybullet/pybullet.c @@ -5521,7 +5521,7 @@ static PyObject* pybullet_calculateInverseKinematics(PyObject* self, PyObject* jointDampingObj = 0; static char* kwlist[] = {"bodyIndex", "endEffectorLinkIndex", "targetPosition", "targetOrientation", "lowerLimits", "upperLimits", "jointRanges", "restPoses", "jointDamping", "physicsClientId", NULL}; - if (!PyArg_ParseTupleAndKeywords(args, keywds, "iiO|OOOOOiO", kwlist, &bodyIndex, &endEffectorLinkIndex, &targetPosObj, &targetOrnObj, &lowerLimitsObj, &upperLimitsObj, &jointRangesObj, &restPosesObj, &jointDampingObj, &physicsClientId)) + if (!PyArg_ParseTupleAndKeywords(args, keywds, "iiO|OOOOOOi", kwlist, &bodyIndex, &endEffectorLinkIndex, &targetPosObj, &targetOrnObj, &lowerLimitsObj, &upperLimitsObj, &jointRangesObj, &restPosesObj, &jointDampingObj, &physicsClientId)) { return NULL; }