Accelerometer
Android API documentation: https://developer.android.com/guide/topics/sensors/sensors_motion#sensors-motion-accel
Usage
Usage
The accelerometer sensor needs to be initialized, then you can read values and once your job done, you can release the sensor.
InitializeAccelerometer: this function will initialize the sensor. If the initialization is successfull, the return value will be true. Otherwise, if the device hasn't this sensor or if the initialization fails, it will return false.
ReleaseAccelerometer: this function must be used in order to release the sensor. Usually, you can call this function at the EndPlay event.
GetLastAccelerometerMeasure: will gives you the last value of this sensor. For the accelerometer, this value is a Vector3.
Example
Example
Place this code in your level blueprint : https://blueprintue.com/blueprint/htm4a-ng/