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 and how do I use it?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
boringperson69
How do I cheat?
Reputation: 0

Joined: 22 Aug 2024
Posts: 7

PostPosted: Sat Aug 24, 2024 3:22 am    Post subject: what rotation system is this and how do I use it? Reply with quote

I've made 2 posts already but since they didn't get any reply, I'm going to put in some more efforts into this one in hopes of getting some help

I'm trying to make a free fly camera for tomb raider 2013. I've found the coordinates, and the pitch and yaw. Using these values, I created a lua script to move the camera around. This works when the camera is completely in the player's control but breaks if it's rotated automatically in during gameplay or cutscenes as the pitch values remain the same as they were before the camera was rotated

There's also a minimum and maximum range pitch. I tried rotating the camera to its maximum pitch, then changing the value of the pitch to something beyond the maximum and checking what writes to the address. but apparently nothing does. It only glitches when you move the mouse but the camera doesn't rotate beyond the maximum angle even though the pitch is -1 (max is -0.87). I know that the pitch and yaw angles do work because locking them or noping them locks the rotation done by the player but it has no effect on auto rotation during gameplay and cutscenes

I found 9 values that completely lock the camera rotation, both the auto rotation as well as the rotation from player's input (The rot 1 to 9 in the video I've attached). But that's the problem because I can't find a code that only locks auto rotation and lets the player control the camera. Changing them or not locking all of them has a very weird effect on the camera rotation (I've shown this in the video). moving the camera when these values are nop'd causes it to go in different directions as the pitch and the yaw values continue to change

Does anyone have an idea what these values are and what I can do with them to get the camera completely under the player's control?

Another thing about these values: If I pause the game when they are nop'd, the camera starts continuously flipping vertically. When I release the camera, depending on the timing, the game will either be or not be inverted. I found a code that would lock that stops this when nop'd but if I do it before noping the 9 values, the games get flipped upside down. I've shown this in the video as well

VIDEO:
youtu(dot)be/AxTydfMwSpg


The weird behavior of the 9 values (rot 1-9) is shown at the start

The camera flipping continuously is at 5:58

Finding the code and fixing this is at 6:33

Sorry for the low quality, I can't do anything about it, my pc's like 15 years old :/
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 147

Joined: 06 Jul 2014
Posts: 4570

PostPosted: Sat Aug 24, 2024 9:51 am    Post subject: Reply with quote

There is no simple answer that works for any general case. It all depends on the game's implementation.

You can try to look at the callstack at instructions that write to important address. Maybe you'll find a function call you can nop instead- i.e. allow calls used by the player to manually control the camera but nop calls used by the game for cutscenes or scripted events.

Regarding math, it's probably all basic linear algebra. Search for information regarding 3d game development- e.g. view matrices. (knowledge of linear algebra isn't required, but you should at least know what a matrix is)

_________________
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
boringperson69
How do I cheat?
Reputation: 0

Joined: 22 Aug 2024
Posts: 7

PostPosted: Sat Aug 24, 2024 1:00 pm    Post subject: Reply with quote

Thanks for replying. I do know what a matrix is, but the camera's entire rotation system depends on just 9 values. I looked up what a rotation matrix is but found out that there is 1 matrix for each axis so there should've been I think 27 values that would affect the rotation right? I also read that you can have 1 matrix for all axes by multiplying the 3 matrices together but when I did that and calculated the values by plugging in the angles I got really simple answers that do not match with those very precise values at the same pitch and yaw.

Otis_inf has already made a camera system for the game (Doesn't work for my version, probably because it's cracked) so I took a look at his source code. According to that, the game uses quaternions but on doing some reasearch on them, I found out that they only need 4 values

I tried looking at the code that writes to it and tried noping the code above that which copies some stuff to the register that writes to the code but it had the same effect as noping the original code and noping the code even prior to that with the same register crashes the game. I can't think of anything else to try

If I can somehow figured out how these values work, I can write a code that takes input from the arrow keys and changes these values correctly

For now I'm writing a code that switches between standard angles (0,45,90,60 degrees etc) when the 9 values are locked

Also, Idk if I mentioned this in the post but when I lock those 9 values and move the mouse around, the camera remains fixed but the pitch and the yaw values change and everything else in the game thinks that the camera is rotating



EDIT: OK Nvm I was wrong. I think the 9 values are 3 rotation matrices (x,y,x) multiplied together! If this is correct I'll be able to rotate the camera during cutscenes as well Very Happy
Back to top
View user's profile Send private message
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