Custom MouseMovement Example - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Prolific Programmers (https://qb64phoenix.com/forum/forumdisplay.php?fid=26) +---- Forum: SMcNeill (https://qb64phoenix.com/forum/forumdisplay.php?fid=29) +---- Thread: Custom MouseMovement Example (/showthread.php?tid=2465) Pages:
1
2
|
RE: Custom MouseMovement Example - NakedApe - 02-27-2024 This works! It's jerky and not proportional, but it reports the x and y positions accurately. Setting the MOD below 9 kills the mouse movement for me. Setting the LIMIT to 20 makes the pointer behave pretty normally. Progress! RE: Custom MouseMovement Example - SMcNeill - 02-27-2024 Which just goes to showcase the issue. Now we just need a dev to fix it. RE: Custom MouseMovement Example - MasterGy - 02-27-2024 well! I didn't even know there was a '_mousemove' command. in the games, when you have to rotate, I couldn't use the '_mousex,_mousey' commands, because if it goes off the screen, then there is no detection afterwards. _mousemovement is good, you just had to add a 'mouse sensitivity' multiplier, because the speed of the movement will be different on every computer. But since I know the mousemove command, this can be avoided. RE: Custom MouseMovement Example - NakedApe - 02-27-2024 Cool, I thought I was stuck with only 5 rotations (desktop width of 1920 / 360 = 5.3) for my spinning ship, but with MasterGy's multiplier I can get many more rotations before hitting the end points. The mouse is more sensitive, but not by much. Thanks, MasterGy! Why didn't I think of that? EDIT: And then by reducing the mouse sensitivity with the OS this works much better for me... Code: (Select All)
RE: Custom MouseMovement Example - MasterGy - 02-27-2024 this is still not the most accurate solution. _mousemovement is proportional to windows mouse sensitivity. Moreover, the value of _limit can also influence it. Let's make the real displacement independent of any FPS rate (_LIMIT). And be independent of Windows mouse sensitivity! Change the value of _LIMIT ! the displacement will be unchanged. The speed of the circle will remain the same even if you turn off the mouse sensitivity in Windows. Code: (Select All)
RE: Custom MouseMovement Example - SMcNeill - 02-27-2024 Just keep in mind guys: What you're doing right now playing with limits and all is *just a band-aid* to patch the glitch. When we fix it so that _MouseMove doesn't have that 250ms lockout, it might change whatever you're working on completely. My personal advice? 1) Enjoy what's working for you now. BUT 2) Keep in mind that we'll probably end up doing a patch of some sort for things in the future and that might mean you'll need to tweak your code to account for the new behavior. RE: Custom MouseMovement Example - MasterGy - 02-27-2024 it will be very good if the machine does not freeze when using _mousemove. But the change in _mousexy will be proportional to the windows mouse sensitivity. It doesn't solve that. My idea is that if we want to specify a completely universal speed, which will move the same amount even if the _limit value is changed and even if the mouse sensitivity of the operating system is different. A standard speed that is beneficial when making games. RE: Custom MouseMovement Example - NakedApe - 02-28-2024 That is very clever, MasterGy. I'll try using that for sure. Thanks! |