Can’t tell for sure, but I think the reason to do that is because of this line of code:
Input.GetAxis("Horizontal") != 0
You should never, and I mean NEVER, compare floats to 0, floats might not always return 0, they might end up with a value of 0.0000143 or something like that, that’s not 0 and it will cause a lot of unexpected behaviours. Always keep that in mind when using floats.
That’s a good point, we need to turn physics off and then back on… so perhaps we could check for the axis value and only rotate if Math.Abs(Input.GetAxis(“Horizontal”)) > SOME_THRESHOLD…
The reason I like Input.GetAxis is that it can work with a controller or other ways of input (doesn’t have to be the keyboard, while on the keyboard it works with both AD and LEFT/RIGHT keys which is nice).