mirror of
https://github.com/bulletphysics/bullet3
synced 2025-01-11 01:40:10 +00:00
add support for the <interpenetrate>, which disables collisions between two bodies linked by a constraint.
This commit is contained in:
parent
323eed2885
commit
f7117466a2
@ -624,7 +624,8 @@ void ColladaConverter::prepareConstraints(ConstraintInput& input)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
domBool interpenetrate = commonRef->getInterpenetrate()->getValue();
|
||||
bool disableCollisionsBetweenLinkedBodies = interpenetrate;
|
||||
//convert INF / -INF into lower > upper
|
||||
|
||||
//currently there is a hack in the DOM to detect INF / -INF
|
||||
@ -681,7 +682,8 @@ void ColladaConverter::prepareConstraints(ConstraintInput& input)
|
||||
linearLowerLimits,
|
||||
linearUpperLimits,
|
||||
angularLowerLimits,
|
||||
angularUpperLimits
|
||||
angularUpperLimits,
|
||||
disableCollisionsBetweenLinkedBodies
|
||||
);
|
||||
} else
|
||||
{
|
||||
@ -693,7 +695,8 @@ void ColladaConverter::prepareConstraints(ConstraintInput& input)
|
||||
linearLowerLimits,
|
||||
linearUpperLimits,
|
||||
angularLowerLimits,
|
||||
angularUpperLimits
|
||||
angularUpperLimits,
|
||||
disableCollisionsBetweenLinkedBodies
|
||||
);
|
||||
}
|
||||
} else
|
||||
|
@ -75,7 +75,8 @@ public:
|
||||
const btVector3& linearMinLimits,
|
||||
const btVector3& linearMaxLimits,
|
||||
const btVector3& angularMinLimits,
|
||||
const btVector3& angularMaxLimits
|
||||
const btVector3& angularMaxLimits,
|
||||
bool disableCollisionsBetweenLinkedBodies
|
||||
) = 0;
|
||||
|
||||
virtual btRigidBody* createRigidBody(bool isDynamic,
|
||||
|
@ -54,7 +54,8 @@ class MyColladaConverter : public ColladaConverter
|
||||
const btVector3& linearMinLimits,
|
||||
const btVector3& linearMaxLimits,
|
||||
const btVector3& angularMinLimits,
|
||||
const btVector3& angularMaxLimits
|
||||
const btVector3& angularMaxLimits,
|
||||
bool disableCollisionsBetweenLinkedBodies
|
||||
)
|
||||
{
|
||||
if (bodyRef)
|
||||
@ -78,7 +79,7 @@ class MyColladaConverter : public ColladaConverter
|
||||
genericConstraint->setAngularLowerLimit(angularMinLimits);
|
||||
genericConstraint->setAngularUpperLimit(angularMaxLimits);
|
||||
|
||||
m_demoApp->getDynamicsWorld()->addConstraint( genericConstraint );
|
||||
m_demoApp->getDynamicsWorld()->addConstraint( genericConstraint,disableCollisionsBetweenLinkedBodies );
|
||||
|
||||
return genericConstraint;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user