trace function is only for writing to the debug log for checking the value of elements or variables.
Admittedly, trace is one of the most important functions in krpano.
To keep the view you use keepview.
loadscene(scenename,null,MERGE|KEEPVIEW);
or something to this effect.
search the forum for keepview if this doesn't work.