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)