HelpAimbot -- trouble at different elevation

Posts 1–15 of 16 · Page 1 of 2
Aimbot -- trouble at different elevation
When I am above an enemy, it aims too low, when I am below them, it aims too high. If this is not a common problem, I can provide my source.
Quote Originally Posted by KappaMang View Post
When I am above an enemy, it aims too low, when I am below them, it aims too high. If this is not a common problem, I can provide my source.
Are you using CalcAngle function?
Quote Originally Posted by Buttars0070 View Post
Are you using CalcAngle function?
Well, duh.
Code:
Vector3 CalcAngles(Vector3 src, Vector3 dst)
        {
            Vector3 delta, angles;
            delta.x = src.x - dst.x;
            delta.y = src.y - dst.y;
            delta.z = src.z - dst.z;
            double hyp = Math.Sqrt(delta.x * delta.x + delta.y + delta.y);
            angles.x = (float)(Math.Asin(delta.z / hyp) * (180 / Math.PI) - myPlayer.myPunch.x * 2.0f);
            angles.y = (float)(Math.Atan(delta.y / delta.x) * (180 / Math.PI) - myPlayer.myPunch.y * 2.0f);
            angles.z = 0;
            angles = NormalizeAngle(angles);
            if (delta.x >= 0) angles.y += 180.0f;
            
            return NormalizeAngle(angles);
        }
Quote Originally Posted by KappaMang View Post
Well, duh.
Code:
Vector3 CalcAngles(Vector3 src, Vector3 dst)
        {
            Vector3 delta, angles;
            delta.x = src.x - dst.x;
            delta.y = src.y - dst.y;
            delta.z = src.z - dst.z;
            double hyp = Math.Sqrt(delta.x * delta.x + delta.y + delta.y);
            angles.x = (float)(Math.Asin(delta.z / hyp) * (180 / Math.PI) - myPlayer.myPunch.x * 2.0f);
            angles.y = (float)(Math.Atan(delta.y / delta.x) * (180 / Math.PI) - myPlayer.myPunch.y * 2.0f);
            angles.z = 0;
            angles = NormalizeAngle(angles);
            if (delta.x >= 0) angles.y += 180.0f;
            
            return NormalizeAngle(angles);
        }
Replying with sarcastic/disrespectful comments is the last thing going to get you help here, I'm going to point you in the right direction out hope you wont be a copy pasting scrub one day.

Read me n00b and see the light.

If after reading the whole thing, word for word, and cannot understand it, I will help you. Pro-tip: it's a math problem not a function problem.
Quote Originally Posted by Buttars0070 View Post
Replying with sarcastic/disrespectful comments is the last thing going to get you help here, I'm going to point you in the right direction out hope you wont be a copy pasting scrub one day.

Read me n00b and see the light.

If after reading the whole thing, word for word, and cannot understand it, I will help you. Pro-tip: it's a math problem not a function problem.
You can still get it working perfectly with using CalcAngle...
Quote Originally Posted by Buttars0070 View Post
Replying with sarcastic/disrespectful comments is the last thing going to get you help here, I'm going to point you in the right direction out hope you wont be a copy pasting scrub one day.

Read me n00b and see the light.

If after reading the whole thing, word for word, and cannot understand it, I will help you. Pro-tip: it's a math problem not a function problem.
It was not meant to be sarcastic, your question seemed dumb. Like, "are you calculating angles?" I believe you meant am I using a certain CalcAngle function, which I assume is the fleep copypaste. Sorry.

- - - Updated - - -

Quote Originally Posted by WasserEsser View Post
Post how you get your source and destination which you pass into CalcAngle.
Code:
localPlayer = fProcess.ReadUInt("client.dll", (int)Offsets.Default.Player);
myLocation.x = fProcess.ReadFloat((int)(localPlayer + (int)Offsets.Default.Origin)) + fProcess.ReadFloat((int)(localPlayer + (int)Offsets.Default.ViewOffset));
myLocation.y = fProcess.ReadFloat((int)(localPlayer + (int)Offsets.Default.Origin + 0x4)) + fProcess.ReadFloat((int)(localPlayer + (int)Offsets.Default.ViewOffset + 0x4));
myLocation.z = fProcess.ReadFloat((int)(localPlayer + (int)Offsets.Default.Origin + 0x8)) + fProcess.ReadFloat((int)(localPlayer + (int)Offsets.Default.ViewOffset + 0x8));
Code:
baseEntity = fProcess.ReadUInt("client.dll", (int)(Offsets.Default.EntityList + ((index) * Offsets.Default.EntDist)));
boneAddress = fProcess.ReadUInt((int)(baseEntity + (int)Offsets.Default.BoneMatrix));
enemyLocation.x = fProcess.ReadFloat((int)(boneAddress + 0x30 * 6 + 0xC));
enemyLocation.y = fProcess.ReadFloat((int)(boneAddress + 0x30 * 6 + 0x1C));
enemyLocation.z = fProcess.ReadFloat((int)(boneAddress + 0x30 * 6 + 0x2C));
Please, ignore the (int) everywhere, I know its messy code.
Okay, here's the answer. You're only using a 2D hypotenuse when you need to use a 3D hypotenuse. The math is wrong. Read that article I sent you to fix it.
Quote Originally Posted by Buttars0070 View Post
Okay, here's the answer. You're only using a 2D hypotenuse when you need to use a 3D hypotenuse. The math is wrong. Read that article I sent you to fix it.
I reread the math, I noticed that. Also, I think I had some stupid code like
Code:
sqrt(x*x + y+y)
which I don't know why that was even working in general. But now I have tried editing multiple things and now my aimbot is rendered useless and I'm lost. The problem is not me wanting to try, its that my major math lessons in this material are next year.

Like this,

I can't understand that because I have only covered algebra classes and geometry. We covered trig slightly in geometry, but it was standard triangle problems. The American school system isn't good at teaching applications of skills in the real world.
Post how you get your source and destination which you pass into CalcAngle.
Trust me, if you read the article you WILL understand. It teaches you the math. Remeber the Hyp for a 2D triangle is a^2 + b^2 = c^2
Quote Originally Posted by Skips View Post
Trust me, if you read the article you WILL understand. It teaches you the math. Remeber the Hyp for a 2D triangle is a^2 + b^2 = c^2
Yes, but I followed the article and know my aimbot is doing nothing. I checked my offsets and I do not know what is wrong.
What did you add.
Quote Originally Posted by Skips View Post
What did you add.
I fixed my calculate angle function according to the tutorial.
Quote Originally Posted by KappaMang View Post
I fixed my calculate angle function according to the tutorial.
Ok but what exactly did you change?

Because according to the tutorial you literally add like 15 characters to the original calc angle.
Or you could open up a tool called the debugger... I know it's rocket science, but please just use it. It's a brand new invention made by NASA I think. Use it and step through everything in code regarding the aimbot? See what values are being passed in and then fix what needs to be fixed based on the knowledge of aimbot math and the values??? Pasting your code into a thread and saying, please fix my paste isn't the best way to solve problems...
Posts 1–15 of 16 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us