If you were using OBSE I could offer a small bit of code that would place the player in the same position relative to the target every time, without the elseifs and the approximations. Takes into account worldspaces vs. cell as well. Assuming that moving the player within the same worldspace isn't the problem.
Please, please, please I'd like to see this bit of code :icecream:
Just learned that the function moveto is almost the same as positioncell, for moving things in a cell, while positionworld is for worldspaces, but they are for coordinates, not relative to objects. does that mean moveto is cells only, or at least less stable in worldspaces? If so, could I run a check to see if its a cell or worldspace to decide which function to use then use setpos to teleport?
Do you read the wiki ? http://cs.elderscrolls.com/constwiki/index.php/PositionWorld :
In almost every case, you would rather use MoveTo instead of this command it says - maybe it will work though :shrug:
http://cs.elderscrolls.com/constwiki/index.php/MoveTo
http://cs.elderscrolls.com/constwiki/index.php/Talk:MoveTo
http://cs.elderscrolls.com/constwiki/index.php/Common_Bugs#MoveTo_Oddities
I would be interested to see if setpos causes the same problems - try it
Also do try the scriptEffectUpdate and/or scriptEffecFinish block instead of gamemode
and comment out the setangle part to see how that goes
Finally teleport a marker to where you want the player to go and move the player to that marker - then move the marker back to your test cell
this freeze is strange I admit