i'm using GetCursorPos(LPPOINT lpPoint) to well... get the cursor position. I can't figure out how to incorperate an lpPoint to be mildly helpful to me. Anyone be of help on this? If i can't use those in equations and such to compare them and find angles, what is there use? I'm looking for a way to capture a couple of numbers that I can plug into my equations (willing to modify) so I can calculate what I need to to get my camera finished. This is the LAST step, but it is VERY difficult to find good info on capturing mouse (being cursor) coordinates, and the only info I found so far, Has brought me to my LPPOINT problems.
I'm sure that having float in my struct isn't helpful, but I get way more conversion errors
Code:
struct cursorPosition
{
float x;
float y;
};
or...
Code:
struct cursorPosition
{
LPPOINT x;
LPPOINT y;
};
this is the code, if you need a structure to see why I need the coordinates, otherwise, all the juicy calculations are left out due to irrelevency, seeing as I don't even know if it'll work yet. The problem is currently compiling. (This runs every frame mind you. I don't mean to state the obvious if I have done so, but just making sure)
Code:
if (GetAsyncKeyState(VK_RBUTTON)&0x8000)
{
if (cursorSet == false)
{
//retrieve coordinates of where right mouse button started being pressed
cursorSet = true;
}
else
{
//retrieve current coordinates
//zero out coordinates for comparison
//Get angle of movement
//calulate movement
}
}
else
{
cursorSet = false;
}
Any info will be appreciated, even if it is just commenting on algorithm problems.