Guide How to get started with learning ViewMatrix

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,061
78,998
2,370
So far those 2 patterns work on:
CS 1.6, L4D2, CSS, CSGO & assault cube

Will work on almost any game where the matrix is defined as a float[16]

It doesn't work on Call of Duty because they use refdef_t which has a matrix3x3 and they have a really weird way of interacting with it
 
Last edited:
  • Like
Reactions: xyzzy

whoon

Full Member
Feb 3, 2019
7
138
0
Is it safe to assume that when the player is looking directly upward or downward, 90 deg and -90 deg, that the 7th and 10th matrix values are 1 or -1 depending on whether the player is looking up or down regardless if the view matrix is row or column major? I have attached an image to illustrate what I mean. Just wondering if it is a good way to distinguish a correct view matrix.
1589614520382.png
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,061
78,998
2,370
Is it safe to assume that when the player is looking directly upward or downward, 90 deg and -90 deg, that the 7th and 10th matrix values are 1 or -1 depending on whether the player is looking up or down regardless if the view matrix is row or column major? I have attached an image to illustrate what I mean. Just wondering if it is a good way to distinguish a correct view matrix.
View attachment 9920
depending on developer logic, no

sometimes you will find patterns that help you identify view matrices, but it's mostly trial and error once you narrow it down to a few addresses
 
  • Like
Reactions: whoon

Kronos21

Dank Tier Donator
Full Member
Nobleman
May 9, 2020
104
3,008
1
For those who struggle follow these steps (I promise you will find the viewMatrix very easily)

Open CheatEngine, and attach to "hl2.exe" process.

Select "Float" and "Unknown initial value" and do the first scan


Now open console and as OfficialHydrux mentionned, we have to set our view angles.

To do this, paste this in your console : sv_cheats 1 (this will enable cheat mode in the game)

Now, still in the console, type : Setang 89 49 0 (<--we set the angles manually, you will see that the player will move)




Now go back in CheatEngine and make sure your settings are like mine :



Make sure you put 0.75 and press Next scan !

(I passed from 75.000.000 values to 33.000 after this ^^)

Now go back in counter strike and in the console type: Setang 0 5 0

Go back in cheat engine, and make sure you select "Rounded (extrem)"



and Press Next Scan

Now you will have not alot of adresses.. :) I have 38 left


Let's try this one more time... Go back to CSS, in console : Setang 89 49 0

Go back in cheat engine : put 0.75 and Next scan

Gp back in CSS : Setang 0 5 0

Go back in Cheat Engine : put 0.08 and Next Scan



Okay so now we have 33 addresses. In counter strike source, you have alot of static adresses (green ones)
you can be 99,99% sure that the viewMatrix is in the green adresses that are left.

So select all the black ones and right click & "Remove"




So now I have 15 green addrresses left (they are pointers :))

What's left to do?

Test each one of them one by one until you find the good one.

15 is not alot and is very fast to test.

I followed Fleep's ESP tutorial.

And So to test them, you select all of them and press the red arrow so that they go at the bottom:



Now we have to check each adress. The viewMatrix is stored in engine.dll module.
So double-click on each adress one-by-one and look if it starts with "engine.dll"+xxxx

IF YES, leave it
IF NO, delete it

For example :

this we leave:


this or this we delete




No we have very small amount of addresses left, this is good :)

Personnaly, I had 8 left after all this.

Nearly finished. So now we test them !

Take each address one by one, double-click and copy whats after "engine.dll"+xxx

And past them in your code & run your ESP hack to see if it's the good one.



When you will have the right address, the ESP will work great ! ;)

PS: If you are not sure about your antiFlicker address, comment theses lines before testing:
Thanks it works good , just tested it.
 

SuperNewbie

Dank Tier Donator
May 5, 2020
28
368
0
The Cherno now also has a pretty good OpenGL series, if you want to add that as a resource.
 

omegaweapontmod

I Know Nothing
Trump Tier Donator
Dank Tier Donator
Nobleman
Top Poster Of Month
Aug 21, 2020
55
1,023
2
If you're like me, you like to have a rigorous mathematical understanding behind how magical things like view matricies work.

I found this lecture extremely helpful for doing just that!


Enjoy!
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods