Hi,
I am trying to access the Accelerometer in an Android and iOS device. Using the following Lua code:
--Acc
myAcc = scaleform.Accelerometer.create();
if myAcc then
scaleform.Accelerometer.set_requested_update_interval(myAcc,100);
end
local AccListener = scaleform.EventListener.create(AccListener, function(e)
print("X: "..e.data.accelerationX.." Y: "..e.data.accelerationY.." Z: "..e.data.accelerationZ);
end );
scaleform.EventListener.connect(AccListener, thisActor,scaleform.EventTypes.AccelerometerUpdate);
Are there any steps I am missing other than code?
Thanks
Bhaskar