Add drag constraints with different conditions to different objects

Is it possible to apply different addDragConstraint conditions to different objects within the same session?

For example, apply the following condition to Object A:

dragManager.addDragConstraint(new PlaneConstraint(vec3.fromValues(0, 0, 1)));

And apply the following condition to Object B:

dragManager.addDragConstraint(new PlaneConstraint(vec3.fromValues(0, 1, 0)));

Maybe somebody can help us with this issue?

Hello @Ichiro,

currently this is possible in a way where you can add the drag constraints whenever the dragging of the object has been started. You can therefore listen to the DRAG_START event and then insert the drag constraints, depending on which object has been dragged. When the drag operation has finished (DRAG_END) you can remove the drag constraint again.

Cheers, Michael

1 Like

Thank you for your help.
I will try it this night.
But if you have example source code or some useful URL, please share it with me.

Hello @Ichiro,

were you able to already solve this issue or do you need any further assistance?

Cheers, Michael

1 Like

Sorry for late reply
It works fine. Thank you very much for your help!!!