values keep increasing

So everytime I test my game, the player moves just fine, but the player’s transform’s position coordinates keep increasing or decreasing even without input from the keyboard.
Here is my movement code:

float horizontal = Input.GetAxis(“Horizontal”);
float vertical = Input.GetAxis(“Vertical”);
m_Mov.Set(horizontal, vertical, 0f);
m_Angle.Set(horizontal, vertical, 1.0f);
m_rigBod.MovePosition(m_rigBod.position + (m_Mov * movSpd));

What is going on? Am I missing a piece of code to balance things out?

How much is it increassing/decreasing by? Are you using a controller? It initially seems like maybe your input axis definition doesn’t have a “dead” zone defined for the axis.What do you have for “Dead” for that axis?

You should have at least something, or the tiny amount of noise from the controller will be interpretted as input.But you should confirm whether the GetAxis() calls are returning very tiny values at all times.

Also, I would probably add some code to not call any of those Set or MovePosition methods unless the input is non-zero (or, more correctly, only call them if !Mathf.Approximately(0, horizontal) || !Mathf.Approximately(0, vertical)

1)It is increasing/decreasing by 0.01 per second. I stop the player object and it just keeps going.
2)I’m just using the arrow keys on the keyboard.
3)As for dead zone, I did not know about this. I’ve just done a few tutorials and I am basically a novice at this; most of what I am doing I’m learning as I go. Thank you for the reply.

So I tried that code you posted and now both x and y position values are increasing/decreasing and the rotation is having some issues.

Would you please submit your code here (using CODE tags)? Without knowing what you’re doing it is impossible to tell what you’re doing wrong.

Did you go into the Input settings and confirm what the “Dead” value is for each axis? Make sure you have something like 0.001 there to start with.