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 


Trying to obtain coordinates in front of player (use of cam)

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

Joined: 06 May 2016
Posts: 4

PostPosted: Sat May 07, 2016 8:47 pm    Post subject: Trying to obtain coordinates in front of player (use of cam) Reply with quote

Alright so I'm trying to get the coordinates in front of my character using Y (vertical) and X (horizontal) camera rotation/direction values so that I can use it for something like noclip.

Here's what I was using before, this requires a Z axis, so it doesn't work.

Code:
float camRot[2];
ReadProcessMemory(hProcess, (void *)0xCE65D8, &camRot, 8, NULL);
float tX, tZ, num;
tZ = camRot[1] * 0.0174532924f;
tX = camRot[0] * 0.0174532924f;
num = abs(cos(tX));

float dir[3];
dir[0] = (-sin(tZ)) * num;
dir[1] = (cos(tZ)) * num;
dir[2] = sin(tX);

dir[0] *= 50;
dir[1] *= 50;
dir[2] *= 50;
WriteProcessMemory(hProcess, (void *)0x21D89CC0, &dir, 12, NULL);
Back to top
View user's profile Send private message Send e-mail
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sat May 07, 2016 9:52 pm    Post subject: Reply with quote

What do you mean by noclip?
Back to top
View user's profile Send private message
ChippingCoder
How do I cheat?
Reputation: 0

Joined: 06 May 2016
Posts: 4

PostPosted: Sat May 07, 2016 10:43 pm    Post subject: Reply with quote

++METHOS wrote:
What do you mean by noclip?


Sort of like this
youtube(dot)com/watch?v=cbo0g8m61rQ

or like this
youtu(dot)be/dsYsv18y54k?t=1m37s

... these are just examples
Back to top
View user's profile Send private message Send e-mail
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun May 08, 2016 9:57 am    Post subject: Reply with quote

ChippingCoder wrote:
so that I can use it for something like noclip.
-What are you wanting to do, exactly? Why are you working with the camera functions?
Back to top
View user's profile Send private message
jcrueger
How do I cheat?
Reputation: 0

Joined: 08 May 2016
Posts: 2

PostPosted: Sun May 08, 2016 9:57 pm    Post subject: Reply with quote

Looks like to make this work you need the players current z axis if these formulas are correct. It should work something like this:

GetPlayers current z axis;
GetCameraY axis; <-- y is up and down x is left and right

without the players z axis there is no way to calculate how high to fly.
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