1 decade ago by clliu
Hi Everyone,
Got a simple question on capturing accelerometer input. I saw there are couple of old post on how to get input from accelerometer. However in the document it says call ig.input.initAccelerometer(), then there should have values in ig.input.accel.x, ig.input.accel.y and ig.input.accel.z.
I tried this code by calling ig.input.initAccelerometer() in init() in main.js and try to get the x,y,z input in one of my entity updates, however it always is 0. Am I doing somthing wrong here? If you can supply some sample code that will be much helpful.
Thanks,
Louis
Got a simple question on capturing accelerometer input. I saw there are couple of old post on how to get input from accelerometer. However in the document it says call ig.input.initAccelerometer(), then there should have values in ig.input.accel.x, ig.input.accel.y and ig.input.accel.z.
I tried this code by calling ig.input.initAccelerometer() in init() in main.js and try to get the x,y,z input in one of my entity updates, however it always is 0. Am I doing somthing wrong here? If you can supply some sample code that will be much helpful.
Thanks,
Louis