how to Remove gravity from Input.acceleration

Because Input.acceleration contains gravity, but I don’t want to gravity.
how to Remove gravity from Input.acceleration ?

When you use the Vector3 from the Input.acceleration you can ignore the up/down acceleration like:

new Vector3 (Input.acceleration.x, 0f, Input.acceleration.z);
//assuming Y is up/down

Here you have a new Vector3 from Input.acceleration where the “height” acceleration is always zero.