Replace cast to int to Mathf.FloorToInt