behdad / box2d

Automatically exported from code.google.com/p/box2d
2 stars 12 forks source link

Cannot pause in RayCast, Edge Shapes, demo #102

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In RayCast.h
    if (!settings->pause)   // add this line
            m_angle += 0.25f * b2_pi / 180.0f;

In EdgeShapes.h, do the same.

Original issue reported on code.google.com by wqyfavo...@gmail.com on 20 Mar 2010 at 2:03

GoogleCodeExporter commented 9 years ago
I found that this modify will disable Single Step mode. 
Solution:

void Step(Settings* settings)
{
   bool progress = (!settings->pause) || settings->singleStep;
   Test::Step(settings);
   // Main body
   if (progress)
   {
      m_angle += 0.25f * b2_pi / 180.0f;
   }
}

Do the same to RayCast and EdgeShapes

Original comment by wqyfavo...@gmail.com on 21 Mar 2010 at 3:59

GoogleCodeExporter commented 9 years ago

Original comment by erinca...@gmail.com on 3 Apr 2010 at 6:54