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.

Newcomers DBPro Corner / Mouse movement detection problem

Author
Message
cabbage
21
Years of Service
User Offline
Joined: 18th Jun 2003
Location: United Kingdom
Posted: 29th Jun 2003 03:52
Has anyone got any good working solutions for detecting mouse movement accurately to control the movement of an object in 3d space etc?

So far I've tried using:

movement:
Repeat
HEADING=0
If mousemovex()>0 Then HEADING=HEADING+1
If mousemovex()0 Then HEADING=HEADING+8
Select HEADING
Case 1 : x=mv:y=0 : EndCase
Case 2 : x=-mv:y=0 : EndCase
Case 4 : x=0:y=mv : EndCase
Case 5 : x=mv:y=mv : EndCase
Case 6 : x=-mv:y=mv : EndCase
Case 8 : x=0:y=-mv : EndCase
Case 9 : x=mv:y=-mv : EndCase
Case 10 : x=-mv:y=-mv : EndCase
Case Default : x=0:y=0 : EndCase
EndSelect
position object 1000,object position x(1000)+x,object position y(1000)+y,zpos
sync
Until inkey$()="j"
return


and a few other mmethods such as taking x and y then waiting for 20 then taking them again to check if the mouse has moved and find the direction.

Neither method seems to work successfully. I find that the right and up movement is detected sort-of ok (ish) but the down and left movement is detected far less.

This is a real head scratcher for me. I need a solid reliable method that works every time

Login to post a reply

Server time is: 2024-09-20 13:42:32
Your offset time is: 2024-09-20 13:42:32