fix the mouse pos by clamping the value from 0 to 1