diff --git a/panda/src/bullet/bulletWorld.cxx b/panda/src/bullet/bulletWorld.cxx index 07a891aa4c..bee0b72f39 100644 --- a/panda/src/bullet/bulletWorld.cxx +++ b/panda/src/bullet/bulletWorld.cxx @@ -608,11 +608,12 @@ remove_vehicle(BulletVehicle *vehicle) { //////////////////////////////////////////////////////////////////// // Function: BulletWorld::attach_constraint // Access: Published -// Description: Deprecated! -// Please use BulletWorld::attach +// Description: Attaches a single constraint to a world. Collision +// checks between the linked objects will be disabled +// if the second parameter is set to TRUE. //////////////////////////////////////////////////////////////////// void BulletWorld:: -attach_constraint(BulletConstraint *constraint) { +attach_constraint(BulletConstraint *constraint, bool linked_collision) { nassertv(constraint); @@ -622,7 +623,7 @@ attach_constraint(BulletConstraint *constraint) { if (found == _constraints.end()) { _constraints.push_back(constraint); - _world->addConstraint(constraint->ptr()); + _world->addConstraint(constraint->ptr(), linked_collision); } else { bullet_cat.warning() << "constraint already attached" << endl; diff --git a/panda/src/bullet/bulletWorld.h b/panda/src/bullet/bulletWorld.h index 6a798cde7f..88fca5abd1 100644 --- a/panda/src/bullet/bulletWorld.h +++ b/panda/src/bullet/bulletWorld.h @@ -70,6 +70,8 @@ PUBLISHED: // Attach/Remove void attach(TypedObject *object); + void attach_constraint(BulletConstraint *constraint, bool linked_collision=false); + void remove(TypedObject *object); // Ghost object @@ -172,7 +174,6 @@ PUBLISHED: // Deprecated methods, will become private soon void attach_character(BulletBaseCharacterControllerNode *node); void remove_character(BulletBaseCharacterControllerNode *node); - void attach_constraint(BulletConstraint *constraint); void remove_constraint(BulletConstraint *constraint); public: