diff --git a/panda/src/bullet/bulletBodyNode.I b/panda/src/bullet/bulletBodyNode.I index fa22a7d61f..376c8061b5 100644 --- a/panda/src/bullet/bulletBodyNode.I +++ b/panda/src/bullet/bulletBodyNode.I @@ -50,6 +50,28 @@ notifies_collisions() const { return get_collision_flag(btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK); } +//////////////////////////////////////////////////////////////////// +// Function: BulletBodyNode::set_collision_response +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE void BulletBodyNode:: +set_collision_response(bool value) { + + set_collision_flag(btCollisionObject::CF_NO_CONTACT_RESPONSE, !value); +} + +//////////////////////////////////////////////////////////////////// +// Function: BulletBodyNode::get_collision_response +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE bool BulletBodyNode:: +get_collision_response() const { + + return !get_collision_flag(btCollisionObject::CF_NO_CONTACT_RESPONSE); +} + //////////////////////////////////////////////////////////////////// // Function: BulletBodyNode::set_collision_flag // Access: Protected diff --git a/panda/src/bullet/bulletBodyNode.h b/panda/src/bullet/bulletBodyNode.h index 1c4afa1201..b125754cb9 100644 --- a/panda/src/bullet/bulletBodyNode.h +++ b/panda/src/bullet/bulletBodyNode.h @@ -61,6 +61,9 @@ PUBLISHED: INLINE void notify_collisions(bool value); INLINE bool notifies_collisions() const; + INLINE void set_collision_response(bool value); + INLINE bool get_collision_response() const; + bool check_collision_with(PandaNode *node); bool has_contact_response() const;