Skip to content

Commit

Permalink
physics debug visualizer fix
Browse files Browse the repository at this point in the history
  • Loading branch information
turanszkij committed Jan 29, 2024
1 parent 85cb648 commit 2055856
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions WickedEngine/wiPhysics_Bullet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ namespace wi::physics
btDispatcherInfo& dispatcherInfo = physics_scene->dynamicsWorld.getDispatchInfo();
dispatcherInfo.m_enableSatConvex = true;

physics_scene->dynamicsWorld.setDebugDrawer(&debugDraw);

btSoftBodyWorldInfo& softWorldInfo = physics_scene->dynamicsWorld.getWorldInfo();
softWorldInfo.air_density = btScalar(1.2f);
softWorldInfo.water_density = 0;
Expand Down Expand Up @@ -1499,8 +1497,14 @@ namespace wi::physics

if (IsDebugDrawEnabled())
{
dynamicsWorld.setDebugDrawer(&debugDraw);
dynamicsWorld.debugDrawWorld();
}
else
{
// Note: there was an issue of stuck debug draws if debug drawer is not removed completely:
dynamicsWorld.setDebugDrawer(nullptr);
}

wi::profiler::EndRange(range); // Physics
}
Expand Down
2 changes: 1 addition & 1 deletion WickedEngine/wiVersion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace wi::version
// minor features, major updates, breaking compatibility changes
const int minor = 71;
// minor bug fixes, alterations, refactors, updates
const int revision = 364;
const int revision = 365;

const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);

Expand Down

0 comments on commit 2055856

Please sign in to comment.