Moves the player left and right with the user Input.
This FSM exposes the Speed variable in the inspector. Modify it to speed up or down the player movement sideways.
![](default.asp?pg=pgDownload&pgType=pgWikiAttachment&ixAttachment=202&sFileName=Player.User%20Input.png)
This is a one state FSM because we constantly check for the user input.
- We reset the x velocity to avoid noise and unwanted drifting.
- We get the delta time and multiply it by the speed and user input to find out by how much we need to translate the gameObject.
- We translate the gameObject.