Hello all!
I am trying to use a normalized vector direction to control the player walking direction, with:
rb.AddForce(direction.normalized*walkSpeed);
Debug.Log(direction.normalized);
However, the normalization sometimes returns something like (-1.0, 0.0, 0.2) or (-1.0, 0.0, 0.1). The y axis has been set to 0 beforehand that and the error appears in both other axis an both directions. I thought this might be just a problem with the conversion to string, but a doesn’t .2 error seem too much? There is also a noticeable change in speed (depending on the direction you are facing the character moves a bit faster) which I am guessing comes from this… Has anyone ever faced this problem?