Stargate Journey

Stargate Journey

5M Downloads

CC:Tweaked Stargate interface call "getRotation()" reports incorrect value

Kitsune-Ultima opened this issue · 1 comments

commented

getRotation() reports 78 degrees when symbol 0 is rotated 180 degrees from initial position, also reports 155 degrees when rotated clockwise by "1 degree" (should be 359)

commented

Ohhh, right. Yeah at some point I changed rotation in a way that 156 rotation units are equal to 360° so the rotation is technically correct. The reason for that change is that 156 is perfectly divisible by 39, the number of symbols on the Milky Way gate, so there is no room for any rounding errors.

Probably should have mentioned it somewhere in the interface function list.

You can easily convert to degrees just by multiplying the number by 360 and dividing by 156:

local rotationDegrees = interface.getRotation() * 360 / 156

If needed, I can also add a getRotationDegrees() function.