accept constraint with single rigidbody

This commit is contained in:
ejcoumans
2007-01-19 03:48:54 +00:00
parent 959e4498f4
commit 7b5301bb43
2 changed files with 61 additions and 27 deletions

View File

@@ -57,8 +57,17 @@ class MyColladaConverter : public ColladaConverter
const btVector3& angularMaxLimits
)
{
if (bodyRef && bodyOther)
if (bodyRef)
{
if (!bodyOther)
{
bodyOther = new btRigidBody(0,0,0);
bodyOther->setWorldTransform(bodyRef->getWorldTransform());
localAttachmentOther = localAttachmentFrameRef;
}
btGeneric6DofConstraint* genericConstraint = new btGeneric6DofConstraint(
*bodyRef,*bodyOther,
localAttachmentFrameRef,localAttachmentOther);