Hi I understand that once PlaneRotationGizmo is attached to a mesh, the default event that enables the rotation of the mesh is right mouse pointer down. But is there a way to change this default event to any other event?
Thanks in Advance.
Hi I understand that once PlaneRotationGizmo is attached to a mesh, the default event that enables the rotation of the mesh is right mouse pointer down. But is there a way to change this default event to any other event?
Thanks in Advance.
Hi Cedric,
When we add a planerotationGizmo to a mesh, the mesh can be rotated when by right mouse click and drag. I understand that this is the default event to rotate a mesh. I would wanted to know if this default event can be changed, say rotating a mesh by using left mouse click and drag?
TBH, I’m not too familiar with the PlaneRotationGizmo but I believe that, by default, either the left click or right click should allow for rotation when using this gizmo. To add to or change the behavior for this particular Gizmo, you’ll probably need to start by looking at the onDragObservable object that’s a part of the PlaneRotationGizmo’s dragBehavior object (its type is PointerDragBehavior). Just out of curiosity, what is the type of action that you’re looking to have?
Yes you are right. Left click also works. But is there a way to restrict rotation only on left and not rotate the mesh on right click?
TBH, I’d have to think on this one. I’ve been looking through the code and there’s no real way to discriminate between left and right clicking with a drag, at least with respect to the PointerDragBehavior object.
Thank you. Appreciate the help.