Accelerometer / Gyroscope support iOS/Andoid

I was wondering if there is a blueprint or Cpp way to use accelerometer or gyroscope data on mobile devices… I currently build a game that also needs something like this. So question is are there plans or do we develop it our own? :slight_smile:

Yes engine support those. In engine terms this is called “Motion”, so search with this key word and you should find nodes and APIs related to that. Motion controls combines all sensors so you can’t get individual data from Accelerator or Gyroscope, you would need to do some external C++ calls for that.

1 Like

1 Like

Thanks! I haven’t looked in here quite a while and figured already myself.
Even my solution is a little different (I will also try yours to see where they differ).

Solved my problem,Thanks !

Hi, i’m new of this amazing forum!
I’m trying to use Motion State (Tilt) with BP posted by pleaseluggage and it work but the view on my Android Phone is very unstable and shak.
On the forum I read that it’s resolvable with LAG on camera (but i don’t find LAG palette) or manualy with “FInterp to” but i’m not able to use.
Anyone can help me?

Hello. Could you tell me please, as considered data with sensors (gyroscope, accelerometer…) mobile device on Android. Unfortunately the Official documentation on this issue is not found on your website and all the possible ways to access the forum on my device didn’t work. Using unreal 4.18.3, HTC desire 530 version of Android 6.0.1. In advance thank you for the answer. It would be great to get instructions from you or an example of how it works.

Hi, I have been trying to get this to work for IOS for a couple of days with no prevail. But I actually got it to work after going in circles. and I just want to post an update on how I got it to work.
So my first initial problem was that I tried to control a pawn with just a camera, I tried all of the solutions I could find on forums, but it was either working in just left/right and up down was buggy or it didn’t work at all.

when it worked for me was when I created a new FPS project and added the BP underneath inside the FirstPersonCharacter BP.
I just wanted to post my “solution” so that others don’t do the same as me.

I have never gotten any readings that would correspond to Yawing the phone, just pitching, rolling, or shaking it, when I do this on my Android.

OMG!! it worked on my ThirdPerson Plattform Game!!! you really made my day mate!! thanks so much

the camera was inverted so…

Glad to hear it! :smiley:

Thanks Patrickimpact, this is a peculiar solution but it does work!

Thanks! you save lot of time to me :slight_smile: works perfectly!

Hello,
This is great and seems to work with rotations. However, is there a way to get movement values?
In other words, I want to move a paddle in something like a brick game that attached, by moving my phone left and right as opposed to using mouse or touch.
Is this possible?

337345-unnamed.png