box2dandengine

How to create "circles" in Box2D?


I want the circle with box2d in video. http://goo.gl/39Ff3


Solution

  • Did you check this site? There seems to be much tutorials.

    And don't forget the manual especially 4.2 Circle Shapes.

    Circle Shapes
    Circle shapes have a position and radius. Circles are solid. You cannot make a hollow circle using the circle shape.

       b2CircleShape circle;
       circle.m_p.Set(2.0f, 3.0f);
       circle.m_radius = 0.5f