You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i am trying to implement picking and dragging of 3d model(Object3d) in rajawali vuforia using ObjectColorPicker. i am following this tutorial(Rajawali/Rajawali#753) .i want my 3dmodel to move only if i touch the model.if i press my finger anywhere on the screen the 3d model moves irrespective of touch.
am i missing something??
Any help is appreciated
after debugging i found at that method "onObjectPicked" of ObjectColorPicker is called if i place my finger anywhere on the screen.
code:
Activity:
@Override
public boolean onTouchEvent(MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
mRenderer.getObjectAt(event.getX(), event.getY());
break;
case MotionEvent.ACTION_MOVE:
mRenderer.Move(event.getX(),event.getY());
break;
case MotionEvent.ACTION_UP:
mRenderer.stopMovingSelectedObject();
break;
default:break;
}
}
In Renderer class:
mPicker = new ObjectColorPicker(this);
mPicker.registerObject(mF22);
mPicker.setOnObjectPickedListener(new OnObjectPickedListener() {
@Override
public void onObjectPicked(Object3D object3D) {
mSelectedObject = object3D;
Log.e(TAG,"selected obj s picked");
}
});
The text was updated successfully, but these errors were encountered:
i am trying to implement picking and dragging of 3d model(Object3d) in rajawali vuforia using ObjectColorPicker. i am following this tutorial(Rajawali/Rajawali#753) .i want my 3dmodel to move only if i touch the model.if i press my finger anywhere on the screen the 3d model moves irrespective of touch.
am i missing something??
Any help is appreciated
after debugging i found at that method "onObjectPicked" of ObjectColorPicker is called if i place my finger anywhere on the screen.
code:
Activity:
In Renderer class:
The text was updated successfully, but these errors were encountered: