Posted May 31, 200816 yr Hello! I want to know how can I calculate X and Y coordinates for BoxESP or AimSpot, maybe someone can show me an example? Game world is in 3D (XYZ) and screen is in 2D (XY) and I have to draw on screen, so maybe I should somehow convert 3D coordinates to 2D coordinates? Currently I can get this information: 1. My XYZ coordinates. 2. All enemies XYZ cordonates. 3. All team mates XYZ cordonates. 4. Distance between me and any other player. 5. My view angle (Pitch and Yaw). 6. Resolution of game window. Programming language: VB6 Drawing method: GDI32 (Note: Yes I know that GDI32 will be flickering, that's not a problem.) Game: Counter-Strike 1.6 So I'm waiting for help and suggestions! P.S. Sorry for bad English grammar.
June 1, 200816 yr Author Yes I want make it with VB6 and I dont see anything wrong in it. I know that VB is not so powerful like C++, but at the momen I want make it with VB6. So if you are unable like "[n45]Nostromo" to answer my question or make some valid suggestions then please leave this thread! P.S. Some time ago my opinion about mug0t foums was litttle bit better than now...
June 1, 200816 yr Some time ago my opinion about mug0t foums was litttle bit better than now... Good thing you came to myg0t
June 1, 200816 yr Author LOL! I still can't get, this section is for "Programming Resources and Help" or it is for "Idiotic talks and sarcasm" ? :O_o: I need something like World2Screen function in VB6. Edited June 1, 200816 yr by Z3R0UN1T
June 1, 200816 yr Yes I want make it with VB6 and I dont see anything wrong in it. I know that VB is not so powerful like C++, but at the momen I want make it with VB6. So if you are unable like "[n45]Nostromo" to answer my question or make some valid suggestions then please leave this thread! P.S. Some time ago my opinion about mug0t foums was litttle bit better than now... AHAHAHAHHAHAHAHAH mug0t! never heard that one before! hahahaha
June 1, 200816 yr Author HA HA HA! LOL! Do you feel satisfaction from grammar mistakes, maybe you are pervert? Poor people who can't control own emotions, like you! And anyway do you know anything except how to laugh from small grammar mistakes and make meaningless posts? Because now all your post are meaningless and away off topic... One letter mistake and fARMiN can feel satisfaction - new pervert fetish!
June 1, 200816 yr HA HA HA! LOL! Do you feel satisfaction from grammar mistakes, maybe you are a pervert? Poor people who can't control own emotions, like you! And anyway do you know anything except how to laugh from small grammar mistakes and make meaningless posts? Because now all your post are meaningless and away off topic... One letter mistake and fARMiN can feel satisfaction - new pervert fetish! You forgot the "a". HAHAHAHHAAHAHAHHA HAHAHA HAA HAH AHAHHAGFHAGHAGHAHAGHHAGHAFHAFHAFHAFHAAGHAGHA
June 2, 200816 yr Ok, you have been tormented enough.........for now anyway NAME gluProject - map object coordinates to window coordinates C SPECIFICATION GLint gluProject( GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ ) PARAMETERS objX, objY, objZ Specify the object coordinates. model Specifies the current modelview matrix (as from a glGetDoublev call). proj Specifies the current projection matrix (as from a glGetDoublev call). view Specifies the current viewport (as from a glGetIntegerv call). winX, winY, winZ Return the computed window coordinates. DESCRIPTION gluProject transforms the specified object coordinates into window coordinates using model, proj, and view. The result is stored in winX, winY, and winZ. A return value of GL_TRUE indicates success, a return value of GL_FALSE indicates failure. To compute the coordinates, let v=(objX,objY,objZ,1.0) represented as a matrix with 4 rows and 1 column. Then gluProject computes v' as follows: v' = P x M x v where P is the current projection matrix proj, M is the current modelview matrix model (both represented as 4x4 matrices in column-major order) and 'x' represents matrix multiplication. The window coordinates are then computed as follows: winX = view(0) + view(2) * (v'(0) + 1) / 2 winY = view(1) + view(3) * (v'(1) + 1) / 2 winZ = (v'(2) + 1) / 2 ======================================================= http://www.gamedeception.net/ has an example on how to manualy do it, but it seems to be down at the moment. Edited June 2, 200816 yr by [n45]Nostromo
June 2, 200816 yr Author Thanks "[n45]Nostromo" for suggestion and try to help! Look at this code: http://forums.myg0t.com/showthread.php?t=18887 I know it is for AimBot, but maybe it is possible to adapt it for screen coordinates? This code can calculate coordinates for Pitch and Yaw, but maybe it is possible to convert Pitch and Yaw to XY screen coordinates and if it is possible then how, because scale is different. If I'm right then: Pitch range is from -89 to 89 Yaw range is from 0 to 360 But how I can adjust it for screen dimensions, for example if screen is 1024x768.
June 3, 200816 yr Thanks "[n45]Nostromo" for suggestion and try to help! Look at this code: http://forums.myg0t.com/showthread.php?t=18887 I know it is for AimBot, but maybe it is possible to adapt it for screen coordinates? This code can calculate coordinates for Pitch and Yaw, but maybe it is possible to convert Pitch and Yaw to XY screen coordinates and if it is possible then how, because scale is different. If I'm right then: Pitch range is from -89 to 89 Yaw range is from 0 to 360 But how I can adjust it for screen dimensions, for example if screen is 1024x768. You mean TRYING.
June 3, 200816 yr This shit is not hard, If you have the starting position of the projectile (x1,y1,z1) and you have the final position (x2,y2,z2). You also have your starting angles. The answer is basic high school trig. (if having 3 coordinate is a bit confusing, try first doing it with only the x and y values) ----->draw a triangle on a piece of paper if it helps. Your problem is that you will have a hard time optimizing this under VB. It will be very, very slow. The only way you will be able to make an aimbot is to translate the x,y,z value of the target to x,y screen coordinates (gluProject). Then you set the curser to this 2d coordinate. There might be an optimized piece of code floating around that will give you pitch / yaw values, but I dont have it. ---------------------------------------------------------------------------------------------- LOL, i just looked st the link you posted and found your answer ? delta_x = my_x - nme_x delta_y = my_y - nme_y delta_z = my_z - nme_z hyp = ((delta_x * delta_x) + (delta_y * delta_y) + (delta_z * delta_z)) ^ (1 / 2) pitch = Atn(delta_z / hyp) * 57.295779513082 'sometimes a certain view angle goes to 0 and makes the aimbot go crazy, this will use the last non 0 integer so you can maintain a smooth non glitchy aimbot If delta_x = 0 Then delta_x = backup End If 'this saves your last view angle for backup in case it is 0 next time around backup = delta_x yaw = Atn(delta_y / delta_x) * 57.295779513082 If delta_x > 0 Then yaw = yaw + 180 End If Like I said ...... this will be sloooo00oooooow. Edited June 3, 200816 yr by [n45]Nostromo