Exposed flag to disable collision between linked bodies.
This commit is contained in:
parent
0fda35d88c
commit
b7ef0d3bc3
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue