Description

Bug submission from a user overseas:

" On some devices (Moto G5 Plus, Moto G5 S Plus) the values are always 0 like : Tilt : 0.00.00.0 RotationRate : 0.00.00.0 Gravity : 0.00.00.0 Accleration : 0.00.00.0. In the android logs, the following error is seen : SensorManager : sensor or listener is null."

" I took a look at the code that UE generates for android (GameActivity.java)
and it looks like if the magnetometer is null, then no values are
calculated"

" I have found that the engine code only proceeds if magnetometer and accelerometer are both not null. The values we want are not dependent on the magnetometer but we are unable to get the values because of the implementation."

~

Chris B: "We use the magnetometer to get the proper orientation frame. Without it the heading will float which means all the axes aren't guaranteed to mean anything"

Steps to Reproduce

1. Acquire Mobile phone without magnetometer ( [Link Removed] )
2. Attempt to deploy to mobile using GetInputMotionState
3. Observe that all values from InputMotionState return 0

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-59537 in the post.

9
Login to Vote

Won't Fix
ComponentUE - Platform - Mobile
Affects Versions4.184.19
CreatedMay 23, 2018
ResolvedMay 30, 2019
UpdatedSep 16, 2019