How to set up tilt input axis mappings for mobile devices?
I tried using Tilt, Gravity, Acceleration, and Rotation Rate as axis mappings in my input settings, but they don't do anything when I test my game on my Nexus 5. What am I missing? How do I use my device's rotation as input?
Can you give me a little details on how you tried to set them up?
If you were trying to bind them directly to the Axis Mappings then yeah, those aren't going to work at the moment as the current Axis Mappings are single float value axes. I am planning on getting the vector axes bindable through the input components, hopefully for 4.2, but no promises.
Currently you should be able to use the PlayerController function GetInputMotionState to get the current values of each of the device motion vectors. If that is not working for you please let me know so we can take a closer look at it.
answered Apr 26 '14 at 09:21 PM
Marc Audy STAFF
I have attempted to recreate the issues that have been occurring with builds on mobile devices and have been successful with Android builds. I have also tested this issue with iOS devices and have have ran into no such issue with the Tilt not showing correctly. Here is the setup that i was using to test the tilt functionality on:
I tested this on both the Samsung Galaxy Note 3 and the iPhone 4, iOS 7.0. The numbers where showing correctly for the iPhone, while the Note 3 was only showing zeroes. I have entered this issue into our bug database so the it may be fixed in a future release.
Thanks and have a great day!
answered Jul 28 '14 at 08:32 PM
[Epic] Gribbs ♦♦ STAFF
Hi, I had the same 0 values on my Android 'Note 10.1 2014' and UE 4.3. As a quick&dirty workaround i'am getting the gyro info directly from LaunchAndroid.cpp (line 440) thru a global variable.
It seems that the surrounding while loop is never ending, so the results are never calculated and send away. Hope that helps.
Follow this question
Once you sign in you will be able to subscribe for any updates here