Well here is another question from the newbie I actually am experimenting with a scene of 3 meshes: a sphere and 2 cones. I want to drag the objects with my mouse and put them in the scene wherever i want.
So i did this:
sphere.isPickable = true;
cone.isPickable = true;
cone2.isPickable = true;
var actualmesh;
scene.onPointerDown = function (evt, pickResult) {
// We try to pick an object
if (pickResult.hit && pickResult.pickedMesh.isPickable==true) {
actualmesh = pickResult.pickedMesh;
actualmesh.addBehavior(pointerDragBehavior);
}
};
scene.onPointerUp = function (evt, pickResult) {
actualmesh.addBehavior(pointerDragBehavior.release);
}
However if I do so, I can move the objects, but only the latest one picked keeps moveable. To me it seems that I did not get the point with poitnerDragBehaviour clearly and how to attach my meshes properly to it. Maybe someone can lend a helping hand and advice how to perform this properly