x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

4.7 GetTilt bug or need to force a reinitialize?

So our iOS game is set to portrait mode only. However, we still have to query the devices tilt for certain screens. We don't want the entire game to rotate, just specific ui pieces. For our initial test case it seems to work OK.

I hold the device straight up prior to launching the game. When the game is launched we grab the current rotation like so:

http://1drv.ms/18iakeu

The rotation displayed is around (P=0,Y=0,R=0). As I rotate the device to the left it centers around (P=-45, Y=-90, R=0) and when I rotate it to the right it will center around (P=45, Y=90, R=0).

Using that information I'm simulating a rotation on some of our UI objects based on the Yaw. (-20 to +20) is the default, while (-100, -80) represents left and (80,100) represents right.

Now, our second test case which fails goes as follows. Close the game completely, rotate the device 90 degrees to the left (so it is horizontal). Launch the game. Remember the game is set to only run as Portrait so the user will naturally rotate the device to see it. The issue though is that the game somehow initialized the tilt information prior to device being rotated by the user. So when the user rotates the device to look at it the rotation is no longer around (P=0, Y=0, R=0) but rather (P=0, Y=45, R=0). Rotating it to the left centers it around (P=90, Y=90, R=0) and to the right centers it around (P=25, Y=90, R=0) which is a bit more baffling..

So, how can we tell the engine to re-calibrate while the user holds it straight up or how can we compensate for this situation in general?

Thanks, -jv

Product Version: Not Selected
Tags:
more ▼

asked Mar 03 '15 at 03:54 PM in Bug Reports

avatar image

jeffvoigt
423 19 34 61

avatar image [Epic] Gribbs ♦♦ STAFF Mar 04 '15 at 07:24 PM

Howdy Jeff,

Thank you for reporting this issue. I have just tested this out and have been unsuccessful so far with a repro. Would you be able to provide any steps that I could use to reproduce this issue internally? Is this issue still occurring on 4.7.2?

Any additional information regarding this report would be greatly appreciated.

Thanks and have a great day!

avatar image jeffvoigt Mar 04 '15 at 07:26 PM

I wasn't aware that 4.7.2 was out. I'll have to try that. Other than that I just have a blueprint that is streamed in and when the begin play fires off I have an EnableInput node along with a Tick event to pull the Tilt and/or GetTilt. Make sure your game is set to only allow portrait and make sure you close down the game COMPLETELY before launching it again w/it rotated.

avatar image [Epic] Gribbs ♦♦ STAFF Mar 07 '15 at 05:53 PM

Howdy Jeff,

I have tried to repro this issue once again and have been unsuccessful. I have been closing the project completely before launching a second time.

Would you be able to share a sample project with me so that I may be able to reproduce this issue internally? You can share a project with me privately via the forums. You can find my forum page here: https://forums.unrealengine.com/member.php?4890-Sean-Gribbin

Thanks and have a great day!

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

I will try to get you something. I ended up using gravity as the values were consistent. Also this was on my iPad, not in the PIE. Thank you for investigating.

more ▼

answered Mar 07 '15 at 05:59 PM

avatar image

jeffvoigt
423 19 34 61

avatar image Rudy Q ♦♦ STAFF Mar 10 '15 at 03:20 PM

Hello jeffvoigt,

I see that you posted your last comment as an answer and it sounds as if you have solved your issue. I am going to mark this issue as resolved. If this is not the case please feel free to reply back and I will be more than happy to assist you further. However, I would also like to note here that I put in a report for the 90 degree offset between iOS and Android.

Make it a great day

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question