# Android tilt calibration

**URL:** <https://forums.unrealengine.com/t/android-tilt-calibration/316701>\
**Category:** Mobile\
**Tags:** tilt, Mobile, unreal-engine, Android, Blueprint, question\
**Created:** [April 28, 2015, 1:21pm UTC](https://forums.unrealengine.com/t/android-tilt-calibration/316701 "2015-04-28T13:21:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mr\_flopps](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mr\_flopps](https://forums.unrealengine.com/u/mr_flopps)\
**Post date:** [April 28, 2015, 1:21pm UTC](https://forums.unrealengine.com/t/android-tilt-calibration/316701/1 "2015-04-28T13:21:57Z")

</div>

Hi there,

I am very new to UE4, I’ve been using it for two weeks. (Blueprints only as I am no programmer) I apologise if this post is in the wrong section, as it might not only be for Android.

I am trying to get Tilt to work on Android - to control the movement of a rolling ball. I have managed to set it up and it is working. However it seems like the calibration of the gyroscope is way off. I created a print string to see the rotation values of the Tilt.

If I start the game with my phone flat on my desk the values are roughly X-3.1 Y-0 Z-3.1

As a result of this controlling the ball is almost impossible. If I turn the device upside down (by holding it above my head) then the values are much closer to zero.

I came across the Calibrate Tilt function and assumed that this would zero out the Tilt values. I’ve tried to incorporate it into the blueprint and I even tried to create a button/widget that calls the function. Unfortunately it isn’t doing anything - No change to the values at all.

Am I doing something wrong? If anyone has any insight as to how to zero out the Tilt Values/Calibrate Tilt that would be amazing.

I tried calibrating my phone (Samsung Note 3) But from what I can see, Samsung have done away with a manual calibration function in the motion device settings.

Much thanks!

Damian

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_528b643b1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_528b643b1](https://forums.unrealengine.com/u/anonymous_user_528b643b1)\
**Post date:** [September 25, 2016, 6:04pm UTC](https://forums.unrealengine.com/t/android-tilt-calibration/316701/2 "2016-09-25T18:04:54Z")

</div>

From what I have seen, the best way to do it is to create a Vector that will keep a given orientation as the “Zero” orientation. Then you can substract this “Zero” vector from the Tilt Vector you receive.

EDIT: you can also look at Shasta solution, you may indeed experience problems when your tilt values directly jump from PI to -PI, in particular if you are smoothing these values

> **[Tilt and Gravity controls on Android sensitivity](https://forums.unrealengine.com/questions/87252/tilt-and-gravity-controls-on-android-sensitivity.html)**
>
> Greetings, 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...
