Hey guys, I am trying to get the mouse delta with the GetMouseX/Y nodes. It only reports if I press one of the mouse keys at same time as I move it though.
My goal is to use the mouse speed as a multiplier for weapon sway. It seems like this should be the simplest way. Another option is that I can get the mouse position in screen space and compare it with itself on tick (vector subtract to get magnitude which would indicate speed, i think?), however I wonder if there is not a simpler way?
I’ve done that but I had to make a minor workaround. Because this is topdown game with UI on screen that I need to be able to click. However, it’s easy workaround.
If i have the cursor set to not visible, then the mouse delta reports but I cannot click any UI. Changing the SetShowMouse cursor bool and any of the input mode functions at runtime doesn’t change anything.
So I only have two options, use with the cursor enabled and find a work around for clicking UI, or disable the cursor and find workaround for mouse delta not reporting. I wish I knew what was causing the problem.
hey that works great! saved me a lot of time. i’m really slow with math stuff
I made one change in that I think it may be best to use percentages, since the screen size may change. I think this way, the math would always be the same. And also if i know its always 0-1 range, then i can base the rest of my calculations from that (which is how i already had it setup before)
I had tried like constantly setting to game mode like that, but the problem is that I need both game and UI to be active because i have UI on screen to be clicked at any time (top down RTS style game).
Perhaps there is some work around, but I think for now, just doing a manual calculation for the mouse delta is probably the easiest thing.