bjorn 8 年之前
父节点
当前提交
0691d5c1cc
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      client.lua

+ 2 - 2
client.lua

@@ -270,9 +270,9 @@ function client:draw()
 					local hx, hy, hz = lovr.headset.getPosition()
 					local ox, oy, oz = denormalize(other.x, config.bounds), denormalize(other.y, config.bounds), denormalize(other.z, config.bounds)
 					local tx, ty, tz = (hx + ox) / 2, 1.2, (hz + oz) / 2
-					local angle = math.atan2((hy - ty), (hx - tx))
+					local angle = math.atan2((hz - oz), (hx - ox))
 					print(tx, ty, tz, angle)
-					self.models.table:draw(tx, ty, tz, .5, angle + math.pi / 2, 0, 1, 0)
+					self.models.table:draw(tx, ty, tz, .5, angle, 0, 1, 0)
 					lovr.graphics.setShader()
 					local angle, ax, ay, az = lovr.math.lookAt(hx, hy, hz, tx, ty + .8, tz)
 					lovr.graphics.print(math.ceil(self.duelTimer), tx, ty + .8, tz, .1, angle, ax, ay, az)