Fix for updating bounds for the BulletDebugNode.

This commit is contained in:
enn0x 2011-07-20 20:43:13 +00:00
parent daed41f05e
commit f008ebe351

View File

@ -255,6 +255,19 @@ post_step(btDynamicsWorld *world) {
// Clear the collected data again
_drawer._lines.clear();
_drawer._triangles.clear();
// Force recompute of bounds
int num_geoms = this->get_num_geoms();
for (int i = 0; i < num_geoms; i++) {
const Geom *geom = this->get_geom(i);
geom->mark_bounds_stale();
}
this->mark_bounds_stale();
// Alternate way, probably a little bit slower
//NodePath np = NodePath::any_path(this);
//np.force_recompute_bounds();
}
////////////////////////////////////////////////////////////////////