Added method to enforce calling the transform_changed hook on bullet nodes.

This commit is contained in:
enn0x 2013-05-22 21:37:29 +00:00
parent 48c2ea92c5
commit ca103005a5
2 changed files with 18 additions and 0 deletions

View File

@ -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();
}

View File

@ -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;