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"

How can I get input from the Accelerometer?

I try to get the Input Motions datas, but all vectors return 0.

When I rotate my iPad4, values returned are null. Only "Gravity" is modified and return a little value, between 0.010 and 0.040, for one axe only. I don't think this is the expected values.

There is other discussions with this problem, encountered in C++ and Blueprint : https://answers.unrealengine.com/questions/25039/how-to-use-accelerometergravity-sensor-data.html



Here it is my test code. Tick function of the PlayerController :

 void AFirstPersonCodePlayerController::Tick(float DeltaTime)
     bool test;
     FVector Tilt;
     FVector RotationRate;
     FVector Gravity;
     FVector Acceleration;
     UE_LOG(LogTemp,Warning,TEXT("RotationRate X : %f / Y : %f / Z : %f"),RotationRate.X,RotationRate.Y,RotationRate.Z);
     UE_LOG(LogTemp,Warning,TEXT("Gravity X : %f / Y : %f / Z : %f"),Gravity.X,Gravity.Y,Gravity.Z);
     UE_LOG(LogTemp,Warning,TEXT("Acceleration X : %f / Y : %f / Z : %f"),Acceleration.X,Acceleration.Y,Acceleration.Z);
Product Version: Not Selected
more ▼

asked May 01 '14 at 01:16 AM in C++ Programming

avatar image

76 7 11 21

avatar image Tim C ♦♦ STAFF May 02 '14 at 09:22 PM

Hi Eddy71. Thank you for your feedback regarding using the accelerometer in your tablet. We are aware that the motion controls are not currently returning values, and plan on rectifying the situation soon.

Have a great day.

avatar image Eddy71 May 03 '14 at 10:21 AM

Hi Tim,

I'm glad to hear it.

Have a nice day

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hi Eddy71,

Have you been able to successfully use the accelerometer for input? I will be marking this post as resolved for tracking purposes, but please feel free to reopen it if you still need assistance.

more ▼

answered Jul 01 '14 at 08:27 PM

avatar image Eddy71 Jul 07 '14 at 05:31 PM

Hi Tim,

"Get Input Motion State" now return values. Soon more tests for integration in my project. I will get back to you if I encounter problems.


(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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