Age Old Tilt Rotation Gravity and Acceleration. Putting it all together

TL;DR ------> Anyone got a working mobile player and camera with motion sensors in the iOS devices I can peek at?

So for about a week I’ve been trying to piece together just how to build a player control where on mobile I can look around with the device and my camera would react accordingly. This has revolved mostly around getting the inputs mapped out, which I’ve done and setting up blueprints, which is where I’m stuck. I started with this thread and was able to replicate the readouts just fine.

I’m on 4.7.2 so I would image all bugs to get this done have been squashed on iOS.

I can get the realtime and input tilt from a few different techniques. Many of you have helped with offering thoughts in how you yourselves put it together but I just can’t seem to replicate your nodes and since I’m on iOS and not android, some networks just don’t react. They seem very large. compared to mouse input, I’m surprised this is so laborious

So some questions: (Please excuse my ignorance. I come from VFX and design, so not a programming mind)

First off, if anyone has a project I could look at which works on your end, I’d love to see it. Could save people typing. But I understand your IP is precious, so I’m not going to beg.

1: This magical Get Motion Input State… I’ve gotten as far as breaking the tilt vectors out, but when I plug itin somewhere? Where?

  1. If I use Get Tilt or input tilt from my mappings in project settings, the map does indeed tilt as my device asks, but it goes crazy. I thought tilt in ios was in radians. So I shouldn’t have to translate, should I?

3: One of the thoughts I had was do mappings for Tilt, Rotation Rate and gravity to replicate motion in Roll Pitch and Yaw but again, mapping to Add Controller XXX Input makes things unstable. I switched them into every conceivable combination and got gimble lock a few times. I’ve also done this to my level and player and playter controller to varying levels of success. (but mostly vomit inducing failure)

So in summary: Help?

Thank you friends. I wish I was more help to you atm that you have been to me.

I’m using tilt input on a few games which work ok with regular user calibration.

I’m not sure i understand what exactly you’re trying to do.

what type of game are you making FP, TH, Flight, Racing?

are you calibrating Tilt on character initiation, and by user input?

to save you time experimenting and tuning your input there is an app ‘UDK Remote’ you can use an iOS device to control the PC editor Tilt input. its not perfect, i think it only works correctly in portrait and you have to calibrate the device in the app menu

Thanks for the time, Mr. Webster.

So what I’m trying to do is to hold the device landscape and as you move around the device, the first person camera moves accordingly. A quick explanation is the iOS app, “Sisters” which is for Google Cardboard. It’s like having a HMD, but instead of it being attached to your head, it’s in your hands.

Does that help?

Thanks

Tom

its not quite right the tilt yaw is not accurate but this should get you going, it works in portrait. I’m convinces that the ‘Get Motion Input State’ node does not return the correct values. please let me know how you get on and when you fix it post a BP here to help myself and others.
Cheers

PS
i built and tested this in the character BP of a new project using the First person Template with UDK remote

So I figured part of it out. At least the part which I’m most concerned in this thread.

I’ve just used a float for the radian input because the number of digits I’ve put in is more than enough for accuracy.

Now the next step is that I have made these joysticks…

As you may be able to tell, the right Joystick is for Up and Down, like raising altitude and lowering altitude. It’s going to behave like a helicopter, but not as some sim, it’s just the only analogy I can find.

So what I’m trying to do is figure out what to map the joysticks in the touch interface box like this:

I’ve tried **** near everything. Essentially it’s got to move just like the Q and E keys in the default player and I can’t for the life of me find the correct gamepad input keys and Q and E keyboard inputs don’t do it. I really don’t want to create discrete mappings in BluePrint if there’s an easier way because I’ve broken this thing sixteen different ways already.

Ideas on this?

Hi pleaseluggage,

Just a heads up, probably best you keep on topic with forum threads respective to the first post.
Otherwise you’ll tend to derail a thread and detract further responses.
Feel free to make another post for the above and you might get more luck.

Did you get any luck with the Tilt rotation etc?

I’m currently on the same issue and equally scratching my head.

Hi Community,

I’ve put out a $50 bounty, on Upwork, to get this problem finally resolved. You can see it here:

https://www.upwork.com/jobs/Unreal-Engine-acheive-augmented-reality-style-camera-Blueprint_~017432da422b14b0fc

If you’re interested, please PM me or apply on Upwork.

I know it’s not much, but I’ll be sure to credit you and share your work back to the Forum/community.

Thanks

Minxies

Hi Minxie, did you get something working?