Simulate “Newton's law of universal gravitation” using Box2D

前端 未结 3 814
一向
一向 2020-12-28 10:28

I want to simulate Newton\'s law of universal gravitation using Box2D.

I went through the manual but couldn\'t find a way to do this.

Basically what I want t

3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-28 10:43

    Unfortunately, Box2D doesn't have native support for it, but you can implement it yourself: Box2D and radial gravity code

提交回复
热议问题