Tilt and Gravity controls on Android sensitivity


I am testing the Rolling ball blueprints using the tilt and gravity axis controls for Android and my current settings have a really high sensitivity. Is this a bug or do I have to fine tune the settings more? Here are my settings:

I lowered the physics ball settings because when using the axis controls to go one direction and to turn in the opposite, the ball will slow down significantly before going the other direction.

I want the ball to basically “turn on a dime” and with these settings I am able to get the rotation BUT the ball feels like it is moving on a checkerboard and I am not able to go in a straight line like the PC controls do. Also the slightest movement on an axis is very very sensitive.

Hi Bergwen,

I don’t know if you have exactly the same problem as I had, but the high sensitivity of the tilt values on Android devices is the result of wrong axis values (at least in my case).

While I was building a roller game on my Nexus 7 I noticed that if the screen was facing up, the X and Y tilt values wrapped from -3.14(…) to +3.14(…). If the screen was facing down, the axies behaved as they should. So I made myself a little function that recalculates the axis values on android devices, so that (0,0) is facing up, not down:

Now my tilting works as expected. The resulting values can be multiplied by another float to control the sensitivity. The clamp at the end of the function is optional.

I hope that this helps you.