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 


Aimbot Failure

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

Joined: 13 Feb 2018
Posts: 2

PostPosted: Tue Feb 13, 2018 8:06 am    Post subject: Reply with quote

Don't know how axis are defined in GTA but i'll assume Y is where gravity is applied for this example.


(x,y,z)
Lets say you are at pos (1,1,1), and your enemy is at (3,1,4).
If you want to look at your target you need to find the angle between those two points. Note that in this example you are at the same height as your enemy, so we will only cover rotation on plane XZ.
So following my perfect drawing in paint we got.
dx = 2 (TargetX - playerX)
dz = 3 (TargetZ - playerZ)

the angle between those two is atan(dz/dx) but this will only work with the first quadrant, that means we will have to apply transformations to get the correct angle in every quadrant, luckily for us we got atan2(y,x) that does all the work for us.

So our aim angle in xz or rotation around xz will be
atan2(dz,dx), this function will return an angle in radians, make sure to convert to degrees if the rotation is in degrees in your game.

This should fix your rotation around plane XZ.

Can't post urls Sad, but i will attach my drawing



axis.png
 Description:
 Filesize:  11.83 KB
 Viewed:  12197 Time(s)

axis.png


Back to top
View user's profile Send private message
elmarcia
How do I cheat?
Reputation: 0

Joined: 13 Feb 2018
Posts: 2

PostPosted: Wed Feb 14, 2018 6:20 am    Post subject: Reply with quote

No, is the difference between your enemy position and yours.

Supose your enemy is at (3,1,4) anda you at (1,1,1)

The difference between those points result in (3,1,4) - (1,1,5)
Then dx = 3 - 1 , dy = 1 - 1, dz = 4 - 5
Resulting
dx = 2, dy = 0, dz = -1

Those are random values for this example.
dz = target->GetPosition().z - FindPlayerPed()->GetPosition().z
dz = same for x
Back to top
View user's profile Send private message
Filipe_Br
Master Cheater
Reputation: 3

Joined: 07 Jan 2016
Posts: 272
Location: My house

PostPosted: Thu Apr 19, 2018 9:02 am    Post subject: Re: Aimbot Failure Reply with quote

A pseudo code that I use in my aimbots and works well.
Taking into account that Y is the upward direction (gravity).

sub.x = enemy.x - player.x
sub.y = enemy.x - player.y
sub.z = enemy.x - player.z

lenxz = sqrt( sub.x*sub.x + sub.z*sub.z )

targetAngle.pitch= ToDegrees(atan2( sub.z, sub.x ))
targetAngle.yaw = ToDegrees(atan2( sub.y, lenxz ))

_________________
...
Back to top
View user's profile Send private message
HitIer
How do I cheat?
Reputation: 22

Joined: 09 Feb 2013
Posts: 0
Location: Location Location Location

PostPosted: Sun May 26, 2019 9:58 pm    Post subject: Reply with quote

This method has been in use since the days of CS

Perhaps you aren't subtracting properly

_________________
With self driving cars, CE can work in real life

t328163 wrote:
Your username derives from the fact that this site cannot format special characters lol.


t328163 wrote:

lmfao, on reddit i'd get banned
Back to top
View user's profile Send private message MSN Messenger
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8516
Location: 127.0.0.1

PostPosted: Mon May 27, 2019 2:32 am    Post subject: Reply with quote

There are tons of aimbot examples across the web, on sites such as UnknownCheats and similar. There's not many things people can do to assist more than what they have here. The game you're targeting is already widely hacked openly as well, with various resources for the exact info you are asking about.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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