// Update is called once per frame void Update() { user.clipFrom = from; RaycastHit hit; double percent = 0.0; if (comp.Raycast(out hit, out percent, mask, resolution, from, to)) { user.clipTo = percent; } else { user.clipTo = DMath.Move(user.clipTo, to, Time.deltaTime); } }