@Override
    public void onAnalog(String name, float isPressed, float tpf) {
        float pos = isPressed / tpf;


            if (name.equals("Accelerate Vehicle")){
                if (car != null) {
                    car.throttlePressed(pos);
                }
            }

            if (name.equals("Brake Vehicle")) {
                if (car != null) {
                    car.brakePressed(pos);
                }
            }

            if (name.equals("Steer Left")){
                if (car != null) {
                    car.steer(pos, tpf);
                }
            }

            if (name.equals("Steer Right")){
                if (car != null) {
                    car.steer(-pos, tpf);
                }
            }
    }