Let me rephrase again - I wanted to mean that how to capture when the mouse is not moving while left mouse button is pressed. Initially the mouse is pressed and the capture it as follows:
onPressed:
{
ripple.oldMouseX = mouse.x
ripple.oldMouseY = mouse.y
ripple.mousePressed = true
ripple.mouseMoved = false
}
onPressed:
{
ripple.oldMouseX = mouse.x
ripple.oldMouseY = mouse.y
ripple.mousePressed = true
ripple.mouseMoved = false
}
To copy to clipboard, switch view to plain text mode
Then I am moving while the mouse button is pressed. I am capturing it as follows:
onPositionChanged:
{
ripple.currentMouseX = mouse.x
ripple.currentMouseY = mouse.y
ripple.mouseMoved = true
ripple.mousePressed = true
}
onPositionChanged:
{
ripple.currentMouseX = mouse.x
ripple.currentMouseY = mouse.y
ripple.mouseMoved = true
ripple.mousePressed = true
}
To copy to clipboard, switch view to plain text mode
Now I want to capture when the mouse stopped moving while the mouse button is pressed. How to capture it ? I am getting the following unexpected output with the above snippet:
"The scene keeps rotating even after i stopped moving the mouse while the mouse button is pressed." What I want to get is as follows:
"The scene only rotates when the mouse is moved while the mouse button is pressed."
Bookmarks