hi, I want to make a simple physic game. Just drag and drop something. But i don't know to make function to drag a sceneObject and drop it to a position. When it is in the postion, something will happen like object locked or rotation.
var posisi = data.screenPosition;
var bintang = wade.getSceneObject('Lingkaran');
var gerak = wade.isMouseDown();
if (gerak){
bintang.moveTo(posisi.x, posisi.y,5000 )
}
var objekKotak = wade.getSceneObject('Kotak');
var posisiKotak = objekKotak.getPosition;
var posisiBintang = bintang.getPosition;
if (posisiBintang.x == posisiKotak.x && posisiBintang.y == posisiKotak.y){
bintang.setRotation(0.7);
}
The sceneObject can move but nothing happened when it's in target position.
Would you like help me. Thanks before