Posts: 161
Threads: 34
Joined: Jul 2012
Reputation:
0
Hi, i try to calculate the spread bullet accuracy but i don't understand why it don't works
I try to take the vector camera X Y Z and compare with the Pos end bullet on onplayershot but apparently not works, how i can calculate this accuracy please?
Posts: 4,878
Threads: 85
Joined: Jun 2007
Reputation:
0
I did this the forward way, by adding spread to serversided bullets.
Getting the actual spread from the gta guns would work the same way, just backwards. Comparing the player pos and bullet target already is the right way. Take the vector between them and compare it to the aim vector of the player (the aim vector is NOT the same as the camera vector, there are some functions to calculate it here that are precise enough, search the forum for that. I had problems with extreme height angles close to +/-90°, did some really crazy math stuff to minimize the error). Then calculate the angles between those two vectors and you got the spread.
Posts: 2,856
Threads: 6
Joined: Jun 2007
Reputation:
0
Just a note, this AdjustVector function just adjust the vector but will never return the correct one
It just corrects the camera vector each 45 degrees to something similar to the aim vector
Doesn't matter what coordinates you use to calculate it
Posts: 161
Threads: 34
Joined: Jul 2012
Reputation:
0
Wow good job but you think i can use your code for create an anti cheat without bug?
Posts: 161
Threads: 34
Joined: Jul 2012
Reputation:
0
I try it last Week, but when i move the values it's strange sometimes. Apparently when the cheat is ON the value don't change much but i don't know if we can use it for anti cheat
if you want i make a video for compare with cheat and without cheat?