Solved Mouse Location - Possible?

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

inZertion

Newbie
Full Member
Nov 29, 2012
10
182
0
Hi all,
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.
 

squeenie

Hacker
Meme Tier VIP
Dank Tier Donator
Mar 6, 2013
677
5,478
37
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.
 

Szaka

Coder
Full Member
Nobleman
Mar 14, 2013
161
718
3
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
 

kaz

Coder
Full Member
Nobleman
Apr 3, 2013
160
1,183
7
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

RECT blahblah;

width = (blahblah.right - blahblah.left )/2
height= (blahblah.bottom- blahblah.top)/2


POINT Cursor;

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
 

inZertion

Newbie
Full Member
Nov 29, 2012
10
182
0
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.
 

Liduen

Hacker
Dank Tier VIP
May 19, 2013
702
8,478
33
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
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.
...#10chars
 

NebulaGrey

Newbie
Full Member
Jun 8, 2014
30
218
1
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.

View attachment pitch triangle.bmp
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.

Edit-
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:

squeenie

Hacker
Meme Tier VIP
Dank Tier Donator
Mar 6, 2013
677
5,478
37
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.

View attachment 2627
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.

Edit-
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.
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.
 

NebulaGrey

Newbie
Full Member
Jun 8, 2014
30
218
1
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.
I was assuming there wouldn't be collision I guess. Sometimes games autocorrect for collision and fixes the problem anyways.
the distance you go is solely based on 3DDistance, which is a vector comprised of the change in the x, y, z coordinates between you and the target point.
The problem I ran into was getting at least one piece of the component.

I found a website on how to do it with minecraft, so maybe that will be of some benefit?
https://www.minecraftforge.net/forum/index.php?topic=9565.0


I had a last idea, you can do it by taking a (0,0) or starting coordinate and use a scalene triangle. Where one leg between you and origin is the distance. Making a right triangle from that, find the angle on the triangle with the leg. From there just use Trig and it's possible. But it would require some point anywhere on the map plus your own coordinates.
 
Last edited:

squeenie

Hacker
Meme Tier VIP
Dank Tier Donator
Mar 6, 2013
677
5,478
37
I was assuming there wouldn't be collision I guess. Sometimes games autocorrect for collision and fixes the problem anyways.
the distance you go is solely based on 3DDistance, which is a vector comprised of the change in the x, y, z coordinates between you and the target point.
The problem I ran into was getting at least one piece of the component.

I found a website on how to do it with minecraft, so maybe that will be of some benefit?
https://www.minecraftforge.net/forum/index.php?topic=9565.0

I meant collision with the point you're looking at.

I had a last idea, you can do it by taking a (0,0) or starting coordinate and use a scalene triangle. Where one leg between you and origin is the distance. Making a right triangle from that, find the angle on the triangle with the leg. From there just use Trig and it's possible. But it would require some point anywhere on the map plus your own coordinates.
The whole point is we dont know the coordinates of where we're looking at, if we did we'd just teleport there, the angle math is the least of your worries.
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods