diff --git a/panda/src/bullet/bulletBodyNode.cxx b/panda/src/bullet/bulletBodyNode.cxx index 3dba3ff2b1..ca7beb7dc4 100644 --- a/panda/src/bullet/bulletBodyNode.cxx +++ b/panda/src/bullet/bulletBodyNode.cxx @@ -655,3 +655,18 @@ add_shapes_from_collision_solids(CollisionNode *cnode) { } } +//////////////////////////////////////////////////////////////////// +// Function: BulletBodyNode::set_transform_dirty +// Access: Published +// Description: This method enforces an update of the Bullet +// transform, that is copies the scene graph transform +// to the Bullet transform. +// This is achieved by alling the protected PandaNode +// hook 'transform_changed'. +//////////////////////////////////////////////////////////////////// +void BulletBodyNode:: +set_transform_dirty() { + + transform_changed(); +} + diff --git a/panda/src/bullet/bulletBodyNode.h b/panda/src/bullet/bulletBodyNode.h index 63f359022f..7d2c6134e9 100644 --- a/panda/src/bullet/bulletBodyNode.h +++ b/panda/src/bullet/bulletBodyNode.h @@ -109,6 +109,9 @@ PUBLISHED: void set_ccd_swept_sphere_radius(PN_stdfloat radius); void set_ccd_motion_threshold(PN_stdfloat threshold); + // Special + void set_transform_dirty(); + public: virtual btCollisionObject *get_object() const = 0;