float xThrow = CrossPlatformInputManager.GetAxis(“Horizontal”)float xOffset = xThrow * xSpeed * Time.deltaTime;
float xRaw = transform.position.x + xOffset;
float xfSpeed = Mathf.Clamp(xRaw, -32, 28);
transform.localPosition = new Vector3(xfSpeed, transform.localPosition.y, transform.localPosition.z);
So this is my code, if i remove the math.clamp, the ship will go indefinitely to the x positive side, and if use clamp is just fixed to the limit of x assigned. I printed all the values and the xThrow is working just find, no key imput that i havent noticed. So i wanted to know what is going on, those are the only lines of code that my scrip have.