Can I scale a shape in box2d as sprite do?

℡╲_俬逩灬. 提交于 2019-12-01 13:58:36

If you are simply assigning shape.m_radius to a new value, it will not work.

You need to reference the shape object associated with the b2Fixture that you created for your object:

fixture->GetShape()->m_radius = new_radius/PTM_RATIO;

Hope this helps.

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