getting this error “game.lua Line: 319 Attempt to perform arithmetic on local ‘gy’ (a nil value)”
using this code :
local gy, gz = event.yGravity, event.zGravity local len = math.sqrt(gy\*gy+gz\*gz) \* (gz \< 0 and -1 or 1) cos\_delta = gz / len sin\_delta = -gy / len
i am trying to set the accelerometers 0 point to the users position/the angel he is holding it