Posted: Mon May 25, 2020 12:21 pm Post subject: What Rotation system is this?
Hi There, I'm fairly new to this so please forgive me if this is obvious.
I was able to find 3 addresses that appear to be linked to my player rotation however I'm having some trouble trying to understand how this works.
As you can see from this i.gyazo.c0m/ce58546e81f7a0430017fc1ce21ffe89, when i rotate my camera all three values change. I have confirmed that I can write to all of these values and doing so will modify the way my character is facing.
I also discovered that I can get any rotation using only 2 of the memory addresses.
Code:
NORTH = 0 0 1
NE = 0 1 1
EAST = 0 1 0
SE = 0 1 -1
SOUTH = 0 0 -1
SW = 0 -1 -1
WEST = 0 -1 0
If anyone knows what this and also how I can rotate by an angle that would be greatly appreciated.
Addresses 2 and 3 are sinusoidal functions. If, for some angle "a", you let east be 0 and a counter clockwise rotation be positive, then address 2 = cos(a) and address3 = sin(a).
address 1 is some weird half angle thing. Using the same frame of reference, it could be described as "sgn(5*pi/2 + a + 4*pi*floor((-a-pi/2)/4*pi)) * sin(x/2 - pi/4)", where sgn(x) = +/- 1 according to whether x is positive or negative. _________________
I don't know where I'm going, but I'll figure it out when I get there.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum