im thinking it might be because

TraceCoords.x

is empty when the vec_rotate is used, but i am not sure about a lot of what you are all helping me with.