Mouse Location - Possible?
I'm working on a trainer/hack for Mirror's Edge and I wondered if anyone knew how to get the location where the "crosshair" is pointing at, and/or if it's even possible!
Thanks in advance.
Its always possible it just might be incredibly difficult in some situations. I don't really know anything about mirrors edge when it comes to hacking but I do think it is an absolutely fantastic game and I also have been thinking of making a trainer for it. If I get round to it I'll let you know what I find.
Post Thanks / Like - 1 Thanks
No he wants to make a teleport hack, which teleports you to the location in the game you're looking at.
Originally Posted by DrD
no, he is trying to make an aimbot and hes asking for xy of the crosshair, just open CE and aim up down up down and scan for increate/decrease
you're looking for mouse coordinates on the X and Y of the screen? It will be in the middle of the game window because it automatically repositions it there.
get Resolution of the window. GetWindowRect
width = (blahblah.right - blahblah.left )/2
height= (blahblah.bottom- blahblah.top)/2
Cursor.x = width+blahblah.left;
Cursor.y = height+blahblah.top;
this gets the middle of the window you're going for so you can setcursorpos and shit
I'm trying to make a teleport hack, I haven't done this before so I don't know if it'll help that much having the coordinates for the cursor. I want to find the coordinates for where the mouse is pointing at, a location.
Originally Posted by Szaka
Originally Posted by inZertion
Studying, Coding, Vacationing,
I've been thinking a little and I think the only way this is possible is if you know the maximum radius of the map around you. From there you can use similar triangle ratios and Pythagorean theorem and with a little bit of trig, figure out the adjacent side of both the yaw triangle and pitch triangle. That should get you the change in x and y you need. for the Z component, the height (opposite) part of the triangle should be the same on both triangles I think, else it's the pitch triangle.
Here are some pictures of the math I propose.
Sorry for bad drawings..
PS: to solve for the second variable use tan(Θ) = height/X, solve for one and plug it into the similar tri-equation in the picture.
I did some scratch math on paper and the numbers aren't working out as well as I thought. I feel like I'm missing something here.
Another approach is tan(phi) = height / (x*y*sin(theta))
But the problem I can't completely workout is how to get at least one component to have a number.
Unfortunately similar triangles seems to be useless here.
So either I missed something crucial or it's simply impossible without an entity in the other end.
Last edited by NebulaGrey; 06-11-2014 at 04:07 AM.
Doesn't really Solve the problem of collision. How far forward do you want to move? Read up on the Unreal 3 engine, there may be a variable that stores the coordinates of where you are looking but your best bet would be to use a trace function.
Originally Posted by NebulaGrey