$begingroup$

  1. When I hit an object, my Fighter is meant to fall to the Ground however due to the Accelerometer, I can nonetheless transfer it up and down regardless that it died. The Scroller on the x-Axis although stops.

    Question: (FIXED) How can I make the Accelerometer cease, after I’ve been hit, and make the Fighter speed up to the bottom (in absence of the accelerometer, all by itself)?

  2. When I transfer the Fighter up and down, the transition from “transferring up” to “transferring down” is not easy. It looks as if it lags.

    Question: How can I Increase the Sensitivity of my Accelerometer?

  3. Also, after I tilt the telephone additional, the speed stays the identical.

    Question: How can I enhance the speed, in relation to the lean diploma?

The code is under:

Accelerometer Code:

float accelY = Gdx.enter.getAccelerometerY();

if (Gdx.enter.getAccelerometerY() < 5){
   velocity.y = -40;
}

if (Gdx.enter.getAccelerometerY() > 5){
   velocity.y = 40;
}

When Fighter hits an Object and dies:

public void die() {
    isAlive = false;
    velocity.y = 0;
    acceleration.y = 460;
}

$endgroup$