How to create “circles” in Box2D?

余生长醉 提交于 2019-12-13 23:51:59

问题


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


回答1:


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


来源:https://stackoverflow.com/questions/10264012/how-to-create-circles-in-box2d

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!