diff --git a/panda/src/bullet/bulletDebugNode.cxx b/panda/src/bullet/bulletDebugNode.cxx index c2f327cd48..3a020aa468 100644 --- a/panda/src/bullet/bulletDebugNode.cxx +++ b/panda/src/bullet/bulletDebugNode.cxx @@ -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(); } ////////////////////////////////////////////////////////////////////