|
@@ -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)
|