I am trying to make my image movement smoother. I know this question has been asked many times, but there is one thing that I am more interested and which doesn't come up in other questions. I am using sensor acceleration value straight for moving bitmap. I am aware that this method limits me between around -9.8
and +9.8
but this is exactly what I want, I want my bitmap to move only as much. I read about low-pass filter, but as far as I understood it is useful for moving the bitmap all around the screen, and in my case it is totally unnecessary. So am I right? Should't I get smooth movement if I use accelerometer values straight for moving bitmap?
Here is the code for getting values from my accelerometer. Its type is TYPE_ACCELEROMETER
public void onSensorChanged(SensorEvent event) {
xAcceleration = event.values[0];
yAcceleration = event.values[1];
}