Results 1 to 4 of 4

Thread: (ET) OpenGL aimbot help, gluProject visible check

  1. #1
    Join Date
    Mar 2013
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default (ET) OpenGL aimbot help, gluProject visible check

    I just thought I should make a new thread about this.
    I'm using an shader based modelrec, it's almost the same as ETH's modelrec.
    Normally scannen for my players head work fine, but when I add an visibility check in with gluProject, the heads only seems visible from the top, or the sides.
    My Visible check
    Code:
    bool IsVisible(GLfloat x, GLfloat y, GLfloat z) {
    	bool result = false;
    	GLdouble wX, wY, wZ, m[16], p[16];
    	GLfloat px;
    	GLint vp[4];
    
    	glGetIntegerv(GL_VIEWPORT, vp);
    	glGetDoublev(GL_MODELVIEW_MATRIX, mvmx);
    	glGetDoublev(GL_PROJECTION_MATRIX, pmx);
    	
    	if (gluProject(x, y, z, mvmx, pmx, vp, &winX, &winY, &winZ) == GL_TRUE) {
    		glReadPixels((int)wX, (int)wY, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT,&pixs);
    		if (abs(pixs) > winZ) {
    			result = true;
    		}
    	}
    	return result;
    }
    My modelrec is like this:
    Code:
    if(strstr(shader,"players/hud") && strstr(shader,"axis")) {
    	goOn = true;
    	ObjectToWindow(Window);
    	if(VisibleTest) { check = true; goOn = false;}
    	if(check) {
    		if(isVisible(Window[0],Window[1],Window[2])) { goOn = true; }
    	}
    	if(goOn) {
    		AddToArray(Window[0],Window[1],Window[2]);
    	}
    }
    (I coded an check boolean in which i can switch while playing so I could test the function)

    The aiming works well, and only goes to nearest enemy but with the visiblecheck on then, it only aims when Im looking or from top, or the sides of the head and so while playing the cursor keeps switching from enemy continously..
    I tried to scan for the helmet in drawelements, and return without drawelements() so it wont get drawn, cus maybe the helmet is blocking the 'head' model, but this didnt seem to help any..

    Therefor I still dont know the problem. Anyone can help with this?

  2. #2
    Join Date
    Aug 2010
    Posts
    25
    Thanks
    18
    Thanked 21 Times in 10 Posts

    Default

    Not bitching about it but why do you always doublepost on your issues? Seems (more or less) like the last comment @http://www.netcoders.cc/forum/showthread.php?7950-(ET)-Coding-advices

    But nethertheless: could you describe the problem a bit better? I really did not got what does not work. Maybe provide some Paint™'ed Screenshots explaining what happens, or what not. (Or maybe just add some debug drawings via opengl on the points your hack thinks they are visible or not and then observe the results ingame)

    That aside, I think you are try building an array of points to aim at later on. Thus adding just the 'visible' points into that array and then determine the nearest point from your current viewport/crosshair/whatever, am I right? The ETH model is in no way the best as it has an huge bug I found out myself while tinkering with implementing the 'Logins Humanized Aim' which then diverted in some 'Sinus Humanized Circle Aim thingy'. The Bug is that if the belt (or center of the model) is not visible the whole check will prove false, at least it was this the last time i tinkered with it, was a huge disadvantage against ETBot )

    Why not just search for all model parts of an solider and build up some matrix of points, which will be on those objects (with some offset for a more finer grid to test against). Then do the 'will my bullet hit' test, also called the trajectory test (if i'm not shuffling things around in my mind, but you know what I mean I think... The upper will do so, just depth test those damn points if they are behind something or not) with this you could mark every point as potential 'aim to this point'-Array. The rest ist piece of cake, just get through this array and the one which is (in 2d translated (nearest crosshair), or based on your current position calculated with the 3d coords (nearest enemy)) the nearest aim at it.

    You could also use the different model parts of the player (or you use offsets from one pint whatever) and mark them as 'left arm', 'head', ... and prioritize them. So if you are at the 'left arm' or 'feet' the next time the a point near some higher damage area like head or body (if using nitmod you have so many hitboxes with so different damage values its like modern games with a real bone system) as soon as those points get visible. Maybe also prioritize points more to the origin of some part so you will hit even when he moves, etc. pp.

    With all those ideas you could create some aim which will also hit the slightest visible part of an body in ET. It's an alternate way to do this, maybe there are even better system. But funny thing is it is kind of fast. You could optimize the visibility test with some logic to have fewer points to initially check thus speeding up the calc of those things, etc.

    Hope the post was kind of helpful even if I could not help your core question about 'why does it not work'.

  3. #3
    Join Date
    Mar 2013
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    @Avoloos, Im sorry for the double post I wasnt intentionally double posting it.
    I just thougt if I make an topic speficly about Opengl aimbot maybe it might be better to get sumone which could help me with my problem.
    I see where you are pointing to. I do understand that you can make it more efficient when you also put arms legs etc in it when they are visible. Its a very nice idea tho

    And yes Im putting the coords into a vertex and calculate nearest point in point of view of the player.
    But to explain my problem.better the calculation amd everything works good.
    Except for the pointvisible check. I tried to do the visiblecheck before adding the coords.
    In my viewport just before aiming at it.
    In 3d coords, 2d coords. But it wont make any difference.
    Its jus pure aimbot so no wallhack or anything so im not fiddling around with depth test and all.
    Now the point of the problem is when Im putting the visible check in, it does do the trick. But only when facing the sides or the top of the head model. But in second hand (I tested) it wont aim at it when it is behind an tree or wall.
    So Im thinking that there is something wrong with the visiblecheck.

    And what you are talking about, an hittest, Im not sure what to think of that, 'if the bullet will hit'.
    Its not same as the visiblecheck with gluProject?

    Im soo stuck with this I dont kbow what I can do about it anymore..
    It drives me nuts when Im.trying and trying and trying to fix it without any results

  4. #4
    Join Date
    Aug 2010
    Posts
    25
    Thanks
    18
    Thanked 21 Times in 10 Posts

    Default

    And what you are talking about, an hittest, Im not sure what to think of that, 'if the bullet will hit'.
    Its not same as the visiblecheck with gluProject?
    I am talking about CG_Trace to do the hit-test. Its an engine function which determines if a bullet (will) hit or not (more specific you have an structure with various values filled by it), or at least i can be used for this.

    EDIT: But you want to use OpenGL to do it... mhm...
    EDIT2: If he is visible just from above, maybe then his body is visible, as it gets hidden by the head... did you try 2 soldiers behind each other? Maybe the one behind the other will be visible for your check. Its worth a try. You would then need to look up your condition which could be faulty.
    EDIT3: Maybe you could use http://www.opengl.org/sdk/docs/man2/...uUnProject.xml (Some better example here: http://wiki.delphigl.com/index.php/gluUnProject) - Thus calculating the point the buffer points at. If there is a tree before your real object (the player) it should have different 3d coords, as the depth would be less. Worth a try. :-)
    Last edited by Avoloos; 19th April 2013 at 23:03.

Visitors found this page by searching for:

gluproject position offset

Aimbot nearest and visible

opengl check 2d visibility

open gl is not working then what to do for aimbot

http:www.netcoders.ccforumshowthread.php8004-(ET)-OpenGL-aimbot-help-gluProject-visible-check

Aimbot gluProject

opengl aimbot

gluproject viewport visible

how to make 3d aimbot

gluProject

opengl gluproject example

gluproject visible

aimbot aimteam opengl32

SEO Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •