How to get events from AxisScaleGizmo, PlaneRotationGizmo, PositionGizmo?

Is there a way to get events from AxisScaleGizmo, PlaneRotationGizmo, PositionGizmo?
I see that GizmoManager has such observables but my game is 2D and I don’t understand how to remove third dimension in GizmoManager to avoid miss clicks that’s why I use separate gizmos for each action.

I’m unsure what you’re asking exactly. Can you provide a PG?

PositionGizmo has a number of observables:

  • onDragObservable
  • onDragStartObservable
  • onDragEndObservable
  • GizmoAxisPointerObserver

And as per the docs you can assess GizmoManager’s internal gizmos with e.g.:

gizmoManager.gizmos.positionGizmo.xGizmo.dragBehavior.onDragStartObservable.add(() => {
  console.log("Position gizmo's x axis started to be dragged");
});
3 Likes

Oh, I was looking those methods on the top level of PositionGizmo and found only onSnapObservable() event. Didn’t know about dragBehaviour property. Thanks, now I got it to work!

1 Like