I am trying to figure out how to seamlessly teleport the player while also rotating them, the problem is when just doing
execute as @a[x=-153,y=29,dy=2,z=-84] at @s rotated as @s run tp @s ~-37 ~10 ~1 ~180 ~
x position won't be correct because it isn't being mirrored. The problem is that I don't know how to do that. I think it would be using score operations, but then I don't know the maths for it.
Consider the picture below:
If the player is up against the blue stained glass (the starting position) they are at
-151.3, and if they are up against the lime stained glass (the destination),
I would need to reflect over the red stained glass (the center line) to make teleporting the player 180° with relative coordinates seamless. How would I go about doing that? (If I get what I need for the x axis, I should be able to apply it to the z axis myself).