Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ObjectColorPicker always picks an object in RajawaliVuforia irrespective of touch #63

Open
kirankiru opened this issue Jul 20, 2015 · 3 comments

Comments

@kirankiru
Copy link

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");
        }
    });
@Ioane5
Copy link

Ioane5 commented Apr 27, 2016

Having same issue 👍

Is there any workaround to fix?

@Angie-Ie
Copy link

Angie-Ie commented Nov 4, 2016

I am also facing same issue, any solution?

@kovac777
Copy link

Same issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants