Cursor jumps back to center in Renderer(DX11)

If I create a renderer (DX11) and show the cursor, then you can see when you left-click and drag (like you do with a camera controlled by mouse), that once you hit the edge of the renderer the cursor jumps back to the 0,0 position, causing also the camera to “jump back”.

Is this a feature or a bug? In either case it would be nice to have an option for either a) have the mouse continue outside the renderer or b) just have the mouse “stick” to the edge until you let go of the mouse. The incrementation of either X or Y should continue if I keep moving the mouse.

I am using the Orbit Camera by @dottore, which uses FrameDifference to increment the Pitch and Yaw. Maybe there is a way to filter out a sudden high change in the frame difference. The camera has a damper on it already, but the jump is still visible.

Anybody have a solution to this?

Its actually a bit weirder than I first thought. The large frame difference only happens if I click and drag from the half of the renderer that is closer to the edge I am hitting.

So if I for example drag from X=-0.5 to the right edge then there the cursor jumps back to the center, but the frame difference does not temporarily jump to -1. If I drag from X=0.5 to the right edge, then when the cursor jumps back the frame difference temporarily jumps to -1.

You can see it in this patch:

Case 1, you click and drag towards the right edge, starting in the left half of the renderer. The frame difference stays constantly positive, even when the mouse jumps back to the center of the renderer when it hits the edge.

Case 2, you click and drag towards the right edge, starting in the RIGHT half of the renderer. The frame difference now temporarily jumps to -1 every time it hits the edge and the cursor jumps back to the center.

I have used Hysterisis to switch to a normal value during the jump back, but with this, I now also have to S+H the position of the cursor when first left clicking.

This behaviour must clearly be a bug. I am using latest DX11 pack and vvvv35.8 64bit.

I think no matter where you start dragging from and hit the edge of the renderer, the frame difference should not jump to a high value during the cursor jumping back to 0,0.

click_and_drag_bug.v4p (13.8 KB)

i can’t see a stuttering or any of those jumping mouse or cursor positions here…

does this also happen, if you only open that patch and have no other patch running?

your issue is caused by the camera node which does this mouse-cycling anywhere…

you can circumvent this by deriving the mousestate from a mouse (window) node instead of the renderer

Thanks @sebl, it looks like you are right. If I just open the patch on its own, the cursor just continues outside the renderer and mouse input stops. The cursor doesn’t cycle back.

But if I have my other patch open, then all of a sudden the mouse starts cycling back when I click and drag off the edge. But now I am wondering what the hell is causing that behaviour, since its affecting this small patch that is not connected to the other patch, so it has to be something that is changing the mouse behavior in the renderer globally. The only thing I could find that would even be able to do this is SetCursorPos, but thats not anywhere in my patch.

I just tried with the Mouse (Devices Window) and it does indeed behave differently. Even with the cursor jumping back the X or Y position just keeps increasing past 1 if you keep clicking and dragging. But as soon as you let go the cursor now jumps way off to the edge of the display(s), whereas with the renderer mouse it stays inside the renderer.

Since I have 2 renderers with different GUI’s I will need to start using the Mouse (Devices Window) and also check above which renderer I am. But that should be doable. But the jumping cursor is really annoying.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.