userAcceleration works in mistery mode… always Y+ and shaking. and after movement for example forward, returns back…
i dont understend how it works! ((
As far as I could determine so far the userAcceleration is a pure acceleration vector3. For some reason when you “stop” it moves “backwards”, the acceleration get’s less to a point where it goes to 0.
@JanHelleman: I’ve played with the accelerometer, and it seems to be useless for translation; I think it’s mostly good for getting tilt and shake. Wish it were otherwise.
@bhaal: When you fire up the gyroscope, it starts out facing whatever direction the phone is facing. You’d need to read the compass to figure out which way is north (I think Prime31 has a plugin) and then you’d need to use a parent transform to compensate for whatever direction the phone is facing on startup.
Glad it’s been useful - I updated the package a little so that it uses only one script (now takes care of creating the necessary parent transform)
I was looking for very short distance movement of the device itself. After searching a lot I realized this gyro is A not precise enough for it and B there’s to much error in the calculations according to some guy from google… To bad
One thing I’ve noticed is that when I rotate the phone around the Y axis (i.e. spinning the phone flat on a table), the image does not rotate as fast as the phone. For instance, when I rotate the phone 360 degrees, the image has only rotated about 270 degrees. The other axes seem to work great. Has anyone else noticed this? Any idea what’s up?