# Device Gravity Not Consistent from Android / iOS

**URL:** <https://forums.unrealengine.com/t/device-gravity-not-consistent-from-android-ios/309386>\
**Category:** World Creation\
**Tags:** gravity, bug, unreal-engine, Blueprint, question\
**Created:** [March 5, 2015, 2:49pm UTC](https://forums.unrealengine.com/t/device-gravity-not-consistent-from-android-ios/309386 "2015-03-05T14:49:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_3933a5bf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3933a5bf](https://forums.unrealengine.com/u/anonymous_user_3933a5bf)\
**Post date:** [March 5, 2015, 2:49pm UTC](https://forums.unrealengine.com/t/device-gravity-not-consistent-from-android-ios/309386/1 "2015-03-05T14:49:53Z")

</div>

I’m pulling the devices Gravity sensor for Android and iOS and noticed there is a difference of 90 degrees between the two. I would like help trying to adjust in a specific manner. Please look at the blueprint below:

 ![32462-gravss.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/e/0/0e09297971339dcf7af11afb1d261c0a6f6b0ce3.jpeg)

When I call the MakeRotationFromAxes and break the Yaw I get values such as (0 → 90 → 180/-180 → -90 → 0) as I rotate. Those values are from my iPAD. Now when I fire up the Android I get values such as (-90 → 0 → 90 → 180/-180 → -90). So everything is off on the Android by -90 degrees. Now, this is easy for me to fix if I just subtract 90 from the Yaw for Android specific devices but I would really like to fix the Gravity vector being returned so my MakeRotationFromAxes yields the same result. I’m a bit unfamiliar with the values of Gravity in axis form so I would like to know how I can make this adjustment prior to calling MakeRotationFromAxes.

Thank you for your time!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_3933a5bf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3933a5bf](https://forums.unrealengine.com/u/anonymous_user_3933a5bf)\
**Post date:** [March 5, 2015, 3:25pm UTC](https://forums.unrealengine.com/t/device-gravity-not-consistent-from-android-ios/309386/2 "2015-03-05T15:25:13Z")

</div>

After trying a few things it seems to be consistent when I take the output of Gravity and RotateVectorAroundAxis (Z) by 90 degrees. That yields the same result I can then plug into MakeRotationFromAxes.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [March 10, 2015, 3:16pm UTC](https://forums.unrealengine.com/t/device-gravity-not-consistent-from-android-ios/309386/3 "2015-03-10T15:16:23Z")

</div>

Hello

I was able to reproduce the 90 degree difference between devices on our end and I have written up a report ( UE-11553). I have submitted it to the developers for further consideration. I will provide updates with any pertinent information as it becomes available.

Make it a great day
