I’m using the input > motion events > acceleration blueprint node, and have a hard time understanding the values that come out of the “Axis value” slot.
I take the vector length, print it to screen, and expect to see a value of 9.81 (= 1g) when the device lies flat on the table.
However, I see values that are smaller than 0.1, which makes me suspect that I’m not looking at the raw acceleration values. Can someone please explain, what I’m missing?
Not sure what you are actually trying to do…
Input -> Motion Events -> Gravity, Provides a vector (x,y,z range -9.81 … 9.81) that points in the current gravity direction (which allows interpretation of device orientation/tilt).
Can confirm this is ‘raw data’ - probably want to implement a low pass filter and deadzone.
I’m interested in the acceleration data, because I need that in a “sensor fusion” algorithm to get a fluent (360 degrees) readout of device orientation. I’ve seen many threads of people that want to have an in-game camera follow the orientation of their phone/tablet (similar to Google Spotlight Stories), and “sensor fusion” seems the way to go.
Looking for gravity in accelerometer data was a sanity check… and the test failed…
Maybe, I need to sum the gravity and acceleration vectors?
I’ve completely overlooked that a proper sensor fusion algorithm should also incorporate the compass sensor, which currently is not available as a Blueprint node in Unreal (it seems). I’ll take a look at the engine source code and see whether I can add some of the “attitude” sensors that the android API provides. (I’m not really a C++ coder, though :-))