Mon, 12/08/2025 - 11:51
Hello,
My team and I are currently working on a modeling software. We are using AIS_ViewController and are encountering some issues in achieving the desired behavior. We would like to have the following behavior:
1) The user clicks on an object, and a gizmo appears.
2) The user clicks and holds on the gizmo and moves the mouse to move the object.
3) The user releases the click and the object stops moving.
We inherited AIS_ViewController to reimplement OnSelectionChanged() and thus be able to add the gizmo to the currently selected object. We did not use AIS_Manipulator, but created our own custom manipulator because we have specific behavior requirements.
We noticed the following:
If I click and hold, then release my manipulator: its ProcessDragging() method will be called successively with the following states: Start, Update, Confirmed, Update, ..., Update, Stop. A first Update state is therefore called before the Confirmed state: is this normal? What is the purpose of the Confirmed state?
If I right-click (without holding down) on my manipulator: its ProcessDragging() method is called with the Start state. Is it normal that the Stop method is not called even though I have released my click?
After this single click on my manipulator, if I hold down the right mouse button, move it, and then release it in the scene, the manipulator's ProcessDragging() method will be called with the states Confirmed, Update, ..., Update, Stop. Is this normal? Why does only the right mouse button move the object and not the left mouse button?
If I remove my manipulator from the AIS_InteractiveContext, it is not removed from the list of drag objects in the AIS_ViewController. Is it the intended behaviour ? How should I proceed to also remove the manipulator from the list of drag objects ?
Thank you for your answers, Robin G.