Tilt Calibration Problem

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

Not sure if this is a bug or we’re getting the tilt values in the wrong way - on my iPhone I use the ‘Get Input Motion State - Tilt’ node (Z-Axis) and it provides values between -1 and +1. I have written my control scheme around this.

Deploying on Android gives me much higher values like you are reporting, and as I use this to control my game it goes crazy. Holding it above my head is the only way to give similar values to those on iOS.

Hi mr_flopps,

It may be that for rolling ball type movement you will need to use the accelerometer and not the gyroscope for Android.

Also just for reference, here’s a thread with the various API docs for player input.

So is it normal for the tilt node to report different values on iOS and android?

(Not trying to hijack the thread, just trying to work out if the high returned tilt values on Android are correct or buggy).

Sorry for digging up an old thread, but I am also having the issue that OP posted about on my nexus 5. Did you make any progress with this?