iPhone tilt precision

Hello all…

I’m trying to get Unity to return a higher precision than a one number mantissa from iPhoneInput.acceleration.

For example, this:

print(iPhoneInput.acceleration);

will output this:

(#.#, #.#, #.#)

but I want a higher level of precision like this:

(#.######, #.######, #.######)

There’s GOTTA be much more in between 0.0 and 0.1.

Thanks all! :slight_smile:
-DC

Print the individual components instead of the whole thing.

–Eric

Ahhh thank you. Strange that I have to break it apart like that to reassemble a new vector with the higher precision though.

Molto grazie!
-DC

You don’t. That’s only for display in the Editor.

I could be insane, but I’m pretty sure I tried getting the data from the accelerometer, plugging it directly into the rotations of an object and it wasn’t very accurate. The motion indicated a low level of interpolation in the rotations. This is all without printing the data to the editor too. I’ll try some more tests and see.

Thanks!
-DC