Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Re-evaluating values

Author
Message
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 19th Feb 2008 19:29
I'm trying to get this to work, but it wont. You may not see the point yet but I'll be wanting to change the angle - gotta get this working first though.



MsVecX and MsVecY should basically be float versions of dbMouseMoveX() and dbMouseMoveY(), but they aren't. What is the problem here?

Thanks

Don't you just hate that Zotoaster guy?
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 20th Feb 2008 17:54
The code seems fine but, have you tried using dbMouseX, dbMouseY instead of dbMouseMoveX, dbMouseMoveY? If I remember correctly, the Mouse Move functions doesn't really return the values that I think you're searching for
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 20th Feb 2008 18:58
Agreed on the dbMoveMove versus MouseX - unless... his mini vector world is based on the difference between his last scan - and not the TOTAL distance the mouse traveled.

I mean - if you think vectors... or ploting... and think every loop - your mouse is at a "arbitrary" point that I'll say is 0,0 then in that case the dbMoveMovedX thing should show the distances from that "origin".

Its his other math that throws me - I recognize the distance calc but I don't quite see how its suppose to arrive at what he's asking it to... but thats me being slow.

Jeff032
17
Years of Service
User Offline
Joined: 13th Aug 2007
Location:
Posted: 20th Feb 2008 19:06 Edited at: 20th Feb 2008 19:09
The problem (or one of them) is that you are calling dbMouseMoveX() and dbMouseMoveY() twice each. The second time they will always be zero. You should store them in a variable and use that instead.

(I think that's how they work...)

Anyway, if that is the problem, debugging probably would have told you what was wrong relatively quickly. You print the distance, you see that it is zero, and then you go "Hmmmmm....."

Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 20th Feb 2008 20:53
Quote: "You should store them in a variable and use that instead"

I agree
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 20th Feb 2008 21:20
I'm surprised I missed that - Good Catch... I agree also!

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 20th Feb 2008 21:40
Thanks guys, that solved the problem. I had no idea that calling a dbMouseMove function twice would cause errors.

Don't you just hate that Zotoaster guy?

Login to post a reply

Server time is: 2024-11-17 06:27:39
Your offset time is: 2024-11-17 06:27:39