@sebavan, I don’t think this is the best behavior. I agree with the idea that if you press left button first, adding right button down would not cancel the rotation of the camera while left button is still down. However, releasing the left button should cancel the rotation of the camera and then the question is what happens with the right button down input.
We have two options:
- Any subsequent mouse input after the first is ignored while the first action is still live. For example, if you press left mouse, camera rotates. Then if you add right mouse, camera still rotates. When you release left button, nothing happens as the right button down was called when in an ignore state. So to pan you would need to release the right button and press again.
- Any subsequent mouse input after the first is added to the stack. Left mouse press rotates camera, then right button pressed adds the pan action to the stack waiting for rotate to end. Once rotate ends with the left button up, we check to see if right button is still down and if so immediately start panning.
I could see either of those behaviors not being too disruptive to the experience. With the first the user would probably realize quickly that they can’t press both buttons at once, which seems reasonable. With the second, the user won’t really notice anything as the experience will seems very responsive since it knows the order in which the user sends input to the system. The second seems like a more complex solution however, but I will leave that up to you to decide which is the more sustainable route with fewer edge cases.