Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


What Rotation system is this?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Murded
Newbie cheater
Reputation: 0

Joined: 16 Nov 2015
Posts: 14

PostPosted: Mon May 25, 2020 12:21 pm    Post subject: What Rotation system is this? Reply with quote

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.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4722

PostPosted: Mon May 25, 2020 1:56 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Tue May 26, 2020 7:36 pm    Post subject: Reply with quote

This looks like quaternions. Game engines like Unity use them a lot for positional and directional data for players/cameras.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites