I was messing around a bit with BJs Drag and Drop features and found the PointerDragBehavior.
Now I want to implement an own drag-event with custom behaviour.
I don’t want the smothing effect and so the sphere.position in my example will be set like:
sphere.position.x += event.delta.x;
Now I am wondering how to generalize the onDragObservable in such a way, that I can use it like:
attachedMesh.position.x += event.delta.x
The only properties I can access are event.delta, event.dragdistance,…and so on!
Here is a playground example:
I found also another way in the Babylon.JS How-To section with the following example:
Is the PointerDragBehavoir more “straightforward” or which way should I choose?
Any advice appreciated!