Debugging Physics Body and Shapes
If you ever wish to have red boxes drawn around your physics bodies to aid in debugging, simple add these 2 lines to your core, where it makes sense to you. Perhaps AppDelegate
is a good place? You can add the following code:
Director::getInstance()->getRunningScene()->getPhysics3DWorld()->setDebugDrawEnable(true);
Director::getInstance()->getRunningScene()->setPhysics3DDebugCamera(cameraObjecct);
Disabling Physics
Using the built-in physics engine is a good idea. It is solid and advanced. However, if you wish to use an alternative physics engine you can. All you need to do is disabling CC_USE_PHYSICS in base/ccConfig.h.