【发布时间】:2020-03-13 16:43:33
【问题描述】:
我正在使用libgdx 和box2d 编写游戏。当一个物体接触另一个物体时,经常会出现幻像接触点。这就是我绘制接触点的方式:
private void renderContactPoints() {
for (Contact contact : world.getContactList())
for (Vector2 point : contact.getWorldManifold().getPoints())
renderer.getBatch().draw(tex, point.x * PPM, point.y * PPM, 20, 20);
}
问题截图
【问题讨论】:
-
幻象接触点是哪些接触点?