Solved Aimbot X wrong

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

TheLeandroNex

Newbie
May 8, 2014
2
122
0
Hello there, well i'm making a C# assault cube hack.
I already get the enemy pos and the player pos.
So all that i need to do is Aim at the enemy.
but the x(vertical) is going always in the middle of the screen.

CODE :
C#:
Vector3 enemy = enemies[ClosestEnemy];

Vector3 m = player - enemy;
float x = (float)(Math.Atan2(m.y, m.z) * (Math.PI / 180));
float y = (float)(-Math.Atan2(m.x * Math.Cos(x), m.z) * (180 / Math.PI));
float z = (float)(Math.Atan2(Math.Cos(x), Math.Sin(x) * Math.Sin(y)) / (Math.PI * 180));
WriteMemoryF(GetPointer(playerBaseAddress, 0x40), y);
WriteMemoryF(GetPointer(playerBaseAddress, 0x44), z + x);
Any help ?
 

Solaire

Respected Hacker
Dank Tier VIP
Dec 15, 2013
1,051
16,353
62
Hello there, well i'm making a C# assault cube hack.
I already get the enemy pos and the player pos.
So all that i need to do is Aim at the enemy.
but the x(vertical) is going always in the middle of the screen.

CODE :
C#:
Vector3 enemy = enemies[ClosestEnemy];

Vector3 m = player - enemy;
float x = (float)(Math.Atan2(m.y, m.z) * (Math.PI / 180));
float y = (float)(-Math.Atan2(m.x * Math.Cos(x), m.z) * (180 / Math.PI));
float z = (float)(Math.Atan2(Math.Cos(x), Math.Sin(x) * Math.Sin(y)) / (Math.PI * 180));
WriteMemoryF(GetPointer(playerBaseAddress, 0x40), y);
WriteMemoryF(GetPointer(playerBaseAddress, 0x44), z + x);
Any help ?

Best I can do

C++:
    dists = us - them;
    float hyp = dists.magnitude();

    result.x = toDeg(atanf(dists.y / dists.x)) + 90;
    result.y = toDeg(asinf(dists.z / hyp));

    result.y = -result.y;

    if (dists.x >= 0)
        result.x += 180;
X should be left/right view angles (Yaw), Y should be up/down view angles (Pitch), and Z (Roll) can generally be left alone unless the game uses it (Such as for planes, vehicles, etc). Look up aimbot math if you want an explanation on how it works.
 
Last edited:

TheLeandroNex

Newbie
May 8, 2014
2
122
0
Best I can do

C++:
    dists = us - them;
    float hyp = dists.magnitude();

    result.x = toDeg(atanf(dists.y / dists.x)) + 90;
    result.y = toDeg(asinf(dists.z / hyp));

    result.y = -result.y;

    if (dists.x >= 0)
        result.x += 180;
X should be left/right view angles (Yaw), Y should be up/down view angles (Pitch), and Z (Roll) can generally be left alone unless the game uses it (Such as for planes, vehicles, etc). Look up aimbot math if you want an explanation on how it works.
Hey, thanks it works :)
 

Jaimy

Newbie
Full Member
Oct 3, 2015
8
82
0
Hello there, well i'm making a C# assault cube hack.
I already get the enemy pos and the player pos.
So all that i need to do is Aim at the enemy.
but the x(vertical) is going always in the middle of the screen.

CODE :
C#:
Vector3 enemy = enemies[ClosestEnemy];

Vector3 m = player - enemy;
float x = (float)(Math.Atan2(m.y, m.z) * (Math.PI / 180));
float y = (float)(-Math.Atan2(m.x * Math.Cos(x), m.z) * (180 / Math.PI));
float z = (float)(Math.Atan2(Math.Cos(x), Math.Sin(x) * Math.Sin(y)) / (Math.PI * 180));
WriteMemoryF(GetPointer(playerBaseAddress, 0x40), y);
WriteMemoryF(GetPointer(playerBaseAddress, 0x44), z + x);
Any help ?
how do you write that code ? :trollface:
 
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