Explorar el Código

For some reason dynamic_cast failed with current Bullet revisions.

enn0x hace 14 años
padre
commit
0ea1ff0ecb
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      panda/src/bullet/bulletCharacterControllerNode.cxx

+ 2 - 1
panda/src/bullet/bulletCharacterControllerNode.cxx

@@ -34,9 +34,10 @@ BulletCharacterControllerNode(BulletShape *shape, float step_height, const char
   // Get convex shape (for ghost object)
   if (!shape->is_convex()) {
     bullet_cat.error() << "a convex shape is required!" << endl;
+    return;
   }
 
-  btConvexShape *convex = dynamic_cast<btConvexShape *>(shape->ptr());
+  btConvexShape *convex = (btConvexShape *)(shape->ptr());
 
   // Ghost object
   _ghost = new btPairCachingGhostObject();