CodingTrain / CodingTrain/Suggestion-Box
[Question][Help] Problem in Placing Stuff in Box2D
- 主要言語
- 言語のデータがありません
- スター
- 570
- フォーク
- 85
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Hello people,
Just to introduce the situation, I am a physics teacher and educator and I am also an aspiring artist, so you can imagine the power I felt in my hands when I first discovered Processing from Shiffman's YT channel and then I the videos on Box2D.
So in my skecth I have a gas container with a piston (to show the kinetic theory of gases) and this container position is determined by the Vec2 pos_pote. The problem is that when I try to place it elsewhere from the middle of the scene (width/2, height/2), the rectangles are draw properly but the fixtures of Box2D become a little bit shifted. The farther from the center of the screen pos_pote is, the more shifted the box2D fixtures become. I've been trying to debugg this for over three days, and I still don't know what is going on. Well, see for yourself:
[kinetic_gas.zip](https://github.com/CodingTrain/Rainbow-Topics/files/999492/kinetic_gas.zip)
_[click on the screen to place particles and notice the collision hitboxes are all shifted to the right from the containers perspective, in this case, pos_pote = (width/2+100, height/2), so things are misplaced only on the x axis.]_
I did not found anyone on the web with the same problem, so I'm desperate. If anyone could help me it would be totally awesome. Thanks very much,
Daniel.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Open kinetic_gas.zip first and inspect how pos_pote is used for drawing the container and creating Box2D fixtures. Compare the rendered rectangles with the fixture positions while moving the container away from the screen center; done means the collision hitboxes remain aligned with the container.
索引モデルが issue の本文から書いたものです。
評価
- 領域
- game-dev
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100