2D orbital physics

前端 未结 2 1471
面向向阳花
面向向阳花 2021-02-02 15:55

I\'m working on a 2D physics engine for a game. I have gravity and masses working, using a simple iterative approach (that I know I\'ll have to upgrade eventually); I can push t

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-02 16:01

    You need to make sure that your delta t iterative time value is small enough. You will definitely have to tinker with the constants in order to get the behaviour you expect. Iterative simulation in your case and most cases is a form of integration where errors build up fast and unpredictably.

提交回复
热议问题