Box2d :roll soft body ball

让人想犯罪 __ 提交于 2019-12-13 19:23:43

问题


I made a soft body ball int box2d that looks like that:

Every point of the circle is a box2d body and every line is a distance joint. How can i roll it? I don't want to change the world gravity and just let it roll , I want it to start spinning from the center (not every circle point independent).

I just need the geeneral idea ,not code.


回答1:


The general idea is to apply the right force to each body. If you want rotation - these forces are normals to the vectors from the center of the ball to the center of the body.



来源:https://stackoverflow.com/questions/18298329/box2d-roll-soft-body-ball

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