Hi, just wondering, does this code work as well as the one shown in the tutorial?
Should I use the “in between” float for Clamp? Clamping the original float seems to be working as well or is this not a good practice?
//my code
float newXPos = transform.localPosition.x + xOffset;
newXPos = Mathf.Clamp(newXPos, -xRange, xRange);
Rather than like in the video
//from tutorial
float rawXPos = transform.localPosition.x + xOffset;
float clampedXPos = Mathf.Clamp(rawXPos, -xRange, xRange);