mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
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
|
// Function: BulletWorld::attach_constraint
|
||||||
// Access: Published
|
// Access: Published
|
||||||
// Description: Deprecated!
|
// Description: Attaches a single constraint to a world. Collision
|
||||||
// Please use BulletWorld::attach
|
// checks between the linked objects will be disabled
|
||||||
|
// if the second parameter is set to TRUE.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void BulletWorld::
|
void BulletWorld::
|
||||||
attach_constraint(BulletConstraint *constraint) {
|
attach_constraint(BulletConstraint *constraint, bool linked_collision) {
|
||||||
|
|
||||||
nassertv(constraint);
|
nassertv(constraint);
|
||||||
|
|
||||||
@ -622,7 +623,7 @@ attach_constraint(BulletConstraint *constraint) {
|
|||||||
|
|
||||||
if (found == _constraints.end()) {
|
if (found == _constraints.end()) {
|
||||||
_constraints.push_back(constraint);
|
_constraints.push_back(constraint);
|
||||||
_world->addConstraint(constraint->ptr());
|
_world->addConstraint(constraint->ptr(), linked_collision);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
bullet_cat.warning() << "constraint already attached" << endl;
|
bullet_cat.warning() << "constraint already attached" << endl;
|
||||||
|
@ -70,6 +70,8 @@ PUBLISHED:
|
|||||||
|
|
||||||
// Attach/Remove
|
// Attach/Remove
|
||||||
void attach(TypedObject *object);
|
void attach(TypedObject *object);
|
||||||
|
void attach_constraint(BulletConstraint *constraint, bool linked_collision=false);
|
||||||
|
|
||||||
void remove(TypedObject *object);
|
void remove(TypedObject *object);
|
||||||
|
|
||||||
// Ghost object
|
// Ghost object
|
||||||
@ -172,7 +174,6 @@ PUBLISHED: // Deprecated methods, will become private soon
|
|||||||
void attach_character(BulletBaseCharacterControllerNode *node);
|
void attach_character(BulletBaseCharacterControllerNode *node);
|
||||||
void remove_character(BulletBaseCharacterControllerNode *node);
|
void remove_character(BulletBaseCharacterControllerNode *node);
|
||||||
|
|
||||||
void attach_constraint(BulletConstraint *constraint);
|
|
||||||
void remove_constraint(BulletConstraint *constraint);
|
void remove_constraint(BulletConstraint *constraint);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user