Android GetInputMotionState node not working

ello, I am trying to get GetInputMotionState node to work in blueprint, I saw online someone say this:

"Fixed by using the node 'Get Input Motion State' instead of 'Get Tilt'. Make sure when adding it you uncheck 'Context Sensitive' as there's a 'Player Controller' input on the node." 

Im sure I’m using the right node, but it only returns 0,0,0
I have “allow IMU sampling” enabled in my project settings.
Get location under finger is working, but the Get Input Motion State stays at 0,0,0

the best clue I found so far is that if the phone doesnt have a magnetometer, these inputs will not work ( my phone does not have a magnetometer )

Apparently the “GameActivity.java template must be modificated” to make it work, but I dont know how…

I really wish this information was made more clear, I’ve lost 2 evenings trying to figure out this issue.
We should be allowed to access the sensor data regardless, even if it is folly, if a developer decides to block a functionality we should be made clearly aware.

I was able to get input working by modifiying the GameActivity.java file to change the code to not depend on magnetometer references, either by commenting out sections asking for it and / or replacing parts. I kept the original default magnetometer declaration and set it to {0,0,1}
I am sure this could be done better, since my results are very jittery, im hoping some smoothing will help.
So if anyone has had this issue before, please share your solution / workaround. I am sharing my modified GameActivity.java file here (make a backup, my mod is hacky)

GameActivity.java.template (202.8 KB)

the path is
UE_5.0\Engine\Build\Android\Java\src\com\epicgames\unreal

1 Like

YOU SAVED ME !!!