Varsha Kamble Posted September 10, 2018 Share Posted September 10, 2018 Hi @Deltakosh, I am using 3 different gizmos for operations - PositionGizmo, RotationGizmo and ScaleGizmo Quote this.utilLayer = new BABYLON.UtilityLayerRenderer(this._scene); this.positionGizmo = new BABYLON.PositionGizmo(this.utilLayer); this.scalingGizmo = new BABYLON.ScaleGizmo(this.utilLayer); this.rotationGizmo = new BABYLON.RotationGizmo(this.utilLayer); I want to perform certain task after dragging,scaling or rotating gizmo , for which i need events. But i didn't find any methods of gizmo to capture such events. There are only 2 methods available for gizmo - dispose and setCustomMesh. Can you please help me with this? Thanks. Regards, Varsha Quote Link to comment Share on other sites More sharing options...
Guest Posted September 10, 2018 Share Posted September 10, 2018 Pinging @trevordev Quote Link to comment Share on other sites More sharing options...
trevordev Posted September 10, 2018 Share Posted September 10, 2018 All the 3axis gizmos have drag behaviors that have start/stop events in them. See this playground: https://www.babylonjs-playground.com/#31M2AP#31 I've also made a note to make this known in the docs. Let me know if you have any issues. Thanks. Quote Link to comment Share on other sites More sharing options...
Varsha Kamble Posted September 12, 2018 Author Share Posted September 12, 2018 Hi @trevordev, Thanks for the updates. ? I tried all gizmo options. I am able to get event for start and end of drag. I did not find any event for scaling in all direction option. Can you please help me with that? Thanks. Regards, Varsha Quote Link to comment Share on other sites More sharing options...
Sebavan Posted September 12, 2018 Share Posted September 12, 2018 Hello, This would be exactly the same actually: https://www.babylonjs-playground.com/#31M2AP#31 Flagging as solved Quote Link to comment Share on other sites More sharing options...
trevordev Posted September 12, 2018 Share Posted September 12, 2018 The all direction option that @Varsha Kamble mentioned is actually private. I will make this public in the next build and it should work via gizmo.uniformScaleGizmo.dragBehavior.onDragEndObservable.add(dragEnd) Sebavan 1 Quote Link to comment Share on other sites More sharing options...
Sebavan Posted September 12, 2018 Share Posted September 12, 2018 Ohh I thought for all sccaling, did not catch the all direction properly ? Thanks a lot @trevordev Quote Link to comment Share on other sites More sharing options...
Varsha Kamble Posted September 17, 2018 Author Share Posted September 17, 2018 Hi @trevordev, Thanks a lot. ?? It worked perfectly. ? Thanks. Regards, Varsha Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.