Go Back   UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats > Anti-Cheat Software & Programming > Direct3D

- Sponsored Advertisement -
http://www.myfpscheats.com/

Welcome to the UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats.
You have to register before you can post and see and access any of the advanced forum features, please click the register link to proceed to the registration form. To start viewing threads or posts, select a forum that you want to visit from the selection below.
Direct3D
hacking programming reversing
You are Unregistered, please register to gain Full access.    
Reply
 
Thread Tools

Calc ptich and yaw for aimbot
Old 07-01-2010, 10:14 PM   #1
h4x0!2

Zacherl's Avatar

Join Date: Jun 2009
Posts: 104
Reputation: -28
Rep Power: 0
Zacherl is becoming a waste of our time
Calc ptich and yaw for aimbot

Hey,

im trying to aim at the head of another player in crossfire, but I failed to calculate the correct values for pitch and yaw. This is my current try:
Code:
function GetCameraVectorFromViewMatrix(Device: IDirect3DDevice9): TD3DXVECTOR3;
var
  View: TD3DXMATRIX;
begin
  FillChar(Result, SizeOf(TD3DXVECTOR3), #0);
  if (Device.GetTransform(D3DTS_VIEW, View) = D3D_OK) then
  begin
    Result.x := - View._41;
      Result.y := - View._42;
      Result.z := - View._43;
  end;
end;

function GetDirectionVector(StartVector, EndVector: TD3DXVECTOR3): TD3DXVECTOR3;
var
  Diff: TD3DXVECTOR3;
begin
    D3DXVec3Subtract(Diff, EndVector, StartVector);
    D3DXVec3Normalize(Result, Diff);
end;

procedure MoveCroshairToPlayer(Device: IDirect3DDevice9;
  PlayerObject: PClientObject; Bone: LongInt);
var
  CameraVector,
  BoneVector,
  Direction: TD3DXVECTOR3;
begin
  CameraVector := GetCameraVectorFromViewMatrix(Device);
  if (not TransformBone(
    Device, PlayerObject, Bone, BoneVector, false)) then Exit;
  Direction := GetDirectionVector(BoneVector, CameraVector);

  LTClientShell^.PlayerClient^.Pitch := Direction.y;
  LTClientShell^.PlayerClient^.Yaw := Direction.x;
end;
TransformBone give me a world vector. Whats wrong with my code?

Best regards
Zacherl
Zacherl is offline

Reply With Quote


Old 07-02-2010, 08:09 AM   #2
n00bie

Nop0x90's Avatar

Join Date: Aug 2009
Posts: 3
Reputation: 10
Rep Power: 31
Nop0x90 has made posts that are generally average in quality
Good Morning,

Firstable I have to say that Delphi sucks. Secondly this Code assumes that "LTClientShell^.PlayerClient^.Pitch" expects a cosine value of the vertical Angle, if it actually does, I don't see why it shouldn't be working. Yaw value seems to be a bit more complicated in terms of y AND z values.

I painted a picture to understand what you are doing and I cant spot a mistake.
Nop0x90 is offline

Reply With Quote

Old 07-03-2010, 12:44 PM   #3
h4x0!2

Zacherl's Avatar

Threadstarter
Join Date: Jun 2009
Posts: 104
Reputation: -28
Rep Power: 0
Zacherl is becoming a waste of our time
* push *
Zacherl is offline

Reply With Quote

Old 07-04-2010, 07:28 AM   #4
Affiliate VIP

zoomgod's Avatar

Join Date: Aug 2007
Posts: 2,491
Reputation: 73953
Rep Power: 843
zoomgod has a huge epeen!zoomgod has a huge epeen!zoomgod has a huge epeen!zoomgod has a huge epeen!zoomgod has a huge epeen!zoomgod has a huge epeen!zoomgod has a huge epeen!zoomgod has a huge epeen!zoomgod has a huge epeen!zoomgod has a huge epeen!zoomgod has a huge epeen!
Recognitions:
Members who have contributed financial support towards UnKnoWnCheaTs. Donation (2)
The UC Member of the Month award is a prestigious award given to a single community member on a monthly basis. Based on a vote by UnKnoWnCheaTs staff, the award is given to the forum member that has shown exemplary achievement and potential in the UnKnoWnCheaTs community, and has shown great commitment to upholding the principles upon which UnKnoWnCheaTs stands for. A member who has been awarded the Member of the Month award has been distinguished as an asset to the UnKnoWnCheaTs community. Member of the Month
Points: 46,850, Level: 32
Points: 46,850, Level: 32 Points: 46,850, Level: 32 Points: 46,850, Level: 32
Activity: 43.5%
Activity: 43.5% Activity: 43.5% Activity: 43.5%
Last Achievements
In some games calling GetTransform don't always work as expected and may or may not work depending on when it is called. In CA for example I used to have to call it from begin scene and store it but after later updates I ended up simply grabbing local player view matrix from their class.

I suspect your running into something similar in CF.
__________________
I'm like a virus, you can delete me but I am never really gone.
Links die, searching does not. (Fravia : searchlores.org)
Solving problems requires effort not a college degree.
zoomgod is offline

Reply With Quote

Old 07-04-2010, 02:11 PM   #5
h4x0!2

Zacherl's Avatar

Threadstarter
Join Date: Jun 2009
Posts: 104
Reputation: -28
Rep Power: 0
Zacherl is becoming a waste of our time
But my bone ESP for example works fine using GetTransform()
Zacherl is offline

Reply With Quote

Old 07-05-2010, 01:13 AM   #6
Level 3

fatboy88's Avatar

Join Date: May 2005
Posts: 1,103
Reputation: 38964
Rep Power: 494
fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!
Recognitions:
The UC Member of the Month award is a prestigious award given to a single community member on a monthly basis. Based on a vote by UnKnoWnCheaTs staff, the award is given to the forum member that has shown exemplary achievement and potential in the UnKnoWnCheaTs community, and has shown great commitment to upholding the principles upon which UnKnoWnCheaTs stands for. A member who has been awarded the Member of the Month award has been distinguished as an asset to the UnKnoWnCheaTs community. Member of the Month
Points: 27,267, Level: 24
Points: 27,267, Level: 24 Points: 27,267, Level: 24 Points: 27,267, Level: 24
Activity: 9.9%
Activity: 9.9% Activity: 9.9% Activity: 9.9%
Last Achievements
2 problems

GetCameraVectorFromViewMatrix// not accurate cameracoords

LTClientShell^.PlayerClient^.Pitch := Direction.y;//both lines need more math or you will not aim properly
LTClientShell^.PlayerClient^.Yaw := Direction.x;

now that you know what the problem is, Im not gonna fix it cuz you never contribute and only ask for hand outs(every post).
__________________


My greatest fear is a Windows Vista Update! D:

ȜǷ-ɲآɳᶨ4 Hack:http://img42.imageshack.us/img42/473/20090203132330.png
fatboy88 is online now

Reply With Quote

Old 07-05-2010, 08:25 AM   #7
h4x0!2

Zacherl's Avatar

Threadstarter
Join Date: Jun 2009
Posts: 104
Reputation: -28
Rep Power: 0
Zacherl is becoming a waste of our time
Quote:
Originally Posted by fatboy88 View Post
Im not gonna fix it cuz you never contribute and only ask for hand outs(every post).
Thats simply not true ..

#1: Easy way to get own index in player list:
Crossfire Information
#2: New pitch and yaw offsets:
Crossfire Information
#3: Struct for "no fall damage" and some other things (i never saw this before):
Crossfire Information

Im just learning. I dont know all the things. Thats the reason I ask. I spent one whole day for the aimbot but it still not works.

I tried this for example. But still crappy values:
Code:
DirectionVector := GetDirectionVector(CameraVector, BoneVector);
  Pitch := ArcTan(sqrt(DirectionVector.x * DirectionVector.x +
    DirectionVector.y * DirectionVector.y) / DirectionVector.z);
  Yaw := ArcTan(DirectionVector.x / (- DirectionVector.y));
Zacherl is offline

Reply With Quote

Old 07-05-2010, 09:51 AM   #8
Level 3

fatboy88's Avatar

Join Date: May 2005
Posts: 1,103
Reputation: 38964
Rep Power: 494
fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!
Recognitions:
The UC Member of the Month award is a prestigious award given to a single community member on a monthly basis. Based on a vote by UnKnoWnCheaTs staff, the award is given to the forum member that has shown exemplary achievement and potential in the UnKnoWnCheaTs community, and has shown great commitment to upholding the principles upon which UnKnoWnCheaTs stands for. A member who has been awarded the Member of the Month award has been distinguished as an asset to the UnKnoWnCheaTs community. Member of the Month
Points: 27,267, Level: 24
Points: 27,267, Level: 24 Points: 27,267, Level: 24 Points: 27,267, Level: 24
Activity: 9.9%
Activity: 9.9% Activity: 9.9% Activity: 9.9%
Last Achievements
FIrst problem is GetCameraVectorFromViewMatrix

its close to but not accurate, some values are off the range is to high and will severly mess up calculation.


@offtopic stuff sometimes learning is figuring it out on your own. :L
__________________


My greatest fear is a Windows Vista Update! D:

ȜǷ-ɲآɳᶨ4 Hack:http://img42.imageshack.us/img42/473/20090203132330.png

Last edited by fatboy88; 07-05-2010 at 09:53 AM.
fatboy88 is online now

Reply With Quote

Old 07-06-2010, 08:59 PM   #9
s0beit's bitch

NeoIII's Avatar

Join Date: Dec 2007
Posts: 343
Reputation: 15059
Rep Power: 207
NeoIII Will always be a legend at UCNeoIII Will always be a legend at UCNeoIII Will always be a legend at UCNeoIII Will always be a legend at UCNeoIII Will always be a legend at UCNeoIII Will always be a legend at UCNeoIII Will always be a legend at UCNeoIII Will always be a legend at UCNeoIII Will always be a legend at UCNeoIII Will always be a legend at UCNeoIII Will always be a legend at UC
Recognitions:
Members who have contributed financial support towards UnKnoWnCheaTs. Donation (11)
Awarded to members who have donated 10 times or more. Gratuity (1)
Points: 11,257, Level: 13
Points: 11,257, Level: 13 Points: 11,257, Level: 13 Points: 11,257, Level: 13
Activity: 5.9%
Activity: 5.9% Activity: 5.9% Activity: 5.9%
Last Achievements
Quote:
Originally Posted by Zacherl View Post
Thats simply not true ..

#1: Easy way to get own index in player list:
Crossfire Information
#2: New pitch and yaw offsets:
Crossfire Information
#3: Struct for "no fall damage" and some other things (i never saw this before):
Crossfire Information

Im just learning. I dont know all the things. Thats the reason I ask. I spent one whole day for the aimbot but it still not works.

I tried this for example. But still crappy values:
Code:
DirectionVector := GetDirectionVector(CameraVector, BoneVector);
  Pitch := ArcTan(sqrt(DirectionVector.x * DirectionVector.x +
    DirectionVector.y * DirectionVector.y) / DirectionVector.z);
  Yaw := ArcTan(DirectionVector.x / (- DirectionVector.y));
i spent 1 week for my first aimbot that i have ever done xD each day some hours
__________________
NeoIII is online now

Reply With Quote
Reply  

  • Submit Thread to Digg
  • Submit Thread to del.icio.us
  • Submit Thread to StumbleUpon
  • Submit Thread to Google
  • Submit Thread to Facebook
  • Submit Thread to My Yahoo!
  • Submit Thread to MySpace
  • Submit Thread to Twitter
  • Submit Thread to Reddit



Tags
aimbot, calc, ptich, yaw
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT +1. The time now is 11:32 AM.