how many pixels is a meter in Box2D?

前端 未结 2 720
一生所求
一生所求 2021-01-15 09:00

Question is simple so, no codes! If someone knows Box2D and SDL2, then, please tell me how to wrap SDL_Rect with b2body. Ofcourse, it requires to know the conversion of metr

2条回答
  •  星月不相逢
    2021-01-15 09:45

    2 pixels a meter? This is a pretty big game world. Ignore DPI. This is completely confusing the issue IMO. Simplest : You model in real world coordinates (box2d does on meters) and you map, in libgdx terminology, via a viewport at rendering. If you make your game world too small there may be problems with vertices collisions however.

提交回复
热议问题