System to move mobile to look around

Hi guys

After searching a lot and test various options, I decided to ask for help.

I want to be able to control a camera with the mobile movement. When you move the mobile from one side to the other camera looks at the sides and the same situation up and down.

I used a blank project to start and created the blueprint: Game Mode, Camera Manager and Player Controller.

I’m using version 4.11 and use a Cubemap with a camera in the center. It is this camera you want to control and look around.

Can someone help me?

Hi,

Try with this: Get Input Motion State | Unreal Engine Documentation

To get:
Tilt
Rotation Rate
Gravity
Acceleration

Into your mobile, with this values you can try move your camera.

Regards!

Hi s4ng3r

Thanks for your answer, I know this node and try to do, but with out success. If can you help me resolve that.

05435cfd77430e485acda039ea48a85cc03115a5.jpeg

Print in your phone all values, Tilt is only when you move your phone to see up-down, X and Z is used X = 0 see sky, X = ±3 see floor.
Gravity in X detect when you rotate your phone left and right, like in temple run game.
To look around is hard… cuz i dont see a value to detect this but i think in use gravity or rotation rate.
Try with this.

And remember, “Set Actor Rotation” use a rotation… a new rotation is a vector with values between {-1,1} to indicate direction, first get actual rotation of your camera, with this vector, based on the values of Tilt or another, add in X,Y or Z of actual rotation vector some values based on tilt, scale this value, if tilt value is between {0, ±3}, generate a rule to get values between {-0.25,0.25} this can be more or less, to control speed, and add into actual camera rotation vector. Finally add this vector to move your camera. Enjoy!

Regards!