Is It possible to make transformation movement by using Accelerometer data or Accel + Gyro ?
as we know, we can make rotation by using Accel or Gyro data.
However, how can we make transformation movement?
I know this is still problematic and experimental. but there must be some ways to reach.
Is there any algorithm or math formula solving this problem?
Nothing prebuilt that I am aware of, but sure it can be done. Just treat it like you would a horizontal/vertical axis. You’ll want to tweak it until it feels right. On games that I have seen use it, they typically have a “calibrate” option so the user can set what is “up”. Otherwise they have to hold the device flat.
the code above did not show result which is what I want.
If I move my smart Phone in x-Axis, object should follow smart phone dirction (object should move in x-Axis too)
I am not gonna tilt or rotate my smartPhone, I am gonna move my smartphone in one Axis (x or y or z)
Oh, I thought you meant to use it like a control stick. Actual directional control may be trickier, especially on general devices. The Tango has direct support for stuff like that. Not sure the best way to handle it on other devices.
Unity does not operate at fixed framerate, so using 0.05f for time scale will result in different movement speed on different devices.
Precise rotational tracking requires a gyroscope. A lot of devices do not have them. In this case some applicaitons (such as google sky) fall back to using compass instead, but precision is not that great.