bjorn пре 8 година
родитељ
комит
9ab1d7e752
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      client.lua

+ 3 - 1
client.lua

@@ -14,7 +14,7 @@ local function normalize(x)
 end
 end
 
 
 local function denormalize(x)
 local function denormalize(x)
-  return ((x / (2 ^ 16)) - .5) * config.bounds
+  return ((x / (2 ^ 16)) - .5) * 2 * config.bounds
 end
 end
 
 
 function client:init()
 function client:init()
@@ -23,6 +23,8 @@ function client:init()
 end
 end
 
 
 function client:update(dt)
 function client:update(dt)
+	local _, y = lovr.headset.getPosition()
+	print(y, normalize(y), denormalize(normalize(y)))
 	while true do
 	while true do
 		local event = self.host:service(0)
 		local event = self.host:service(0)
 		if not event then break end
 		if not event then break end