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

3D model rotation and zoom does not smooth? #160

Open
tuzenvn opened this issue Jul 4, 2018 · 11 comments

Comments

Projects
None yet
6 participants
@tuzenvn
Copy link

commented Jul 4, 2018

I try to build ARRetail with my model like lamps and chairs but I see interactions with models (rotation and zoom) does not smooth like IOS ARToolkit. My issue sometimes conflig actions, for example when I using two fingers to rotation but model do zoom out or zoom in and when I want to scale model then that do rotation model.

@radvani

This comment has been minimized.

Copy link
Contributor

commented Jul 5, 2018

Hi @tuzenvn,

Could you let me know what device you're using for the ARRetail example? I'd like to see if I can reproduce this. Thanks.

@tuzenvn

This comment has been minimized.

Copy link
Author

commented Jul 6, 2018

Hi @radvani ,

I use Pixel XL - OS 8.1 for testing.

Thanks.

@achuvm

This comment has been minimized.

Copy link
Contributor

commented Jul 30, 2018

Hi @tuzenvn,

Sorry for the delayed response, I've attempted to reproduce this issue and am not able to using the Pixel device we have in house.

Just a note, the ARRetail app only supports single finger dragging and two finger rotating, there is no two finger scaling in that example (as a real-world furniture placing application wouldn't require that feature).

Let use know if you still have issues.

Thanks,

@HLneoh

This comment has been minimized.

Copy link

commented Sep 4, 2018

@achuvm What if I want to have smooth 3D scaling and rotating in my AR application? Is it possible to achieve that?

@achuvm

This comment has been minimized.

Copy link
Contributor

commented Sep 4, 2018

@HLneoh,

Check out the code for two-finger scaling/rotation in our open source Figment App:
https://github.com/viromedia/figment-ar

You can install the app and test it for yourself from the Play Store or App Store.

@HLneoh

This comment has been minimized.

Copy link

commented Sep 4, 2018

@achuvm Thanks for the comment. However, figment AR used viro react and react native to implement the feature. May I know is it possible to use viro core (Java) to achieve that?

@achuvm

This comment has been minimized.

Copy link
Contributor

commented Sep 4, 2018

Hi @HLneoh,

Yes, you can use very similar logic (unfortunately we don't have a published example of this) through the use of the GesturePinchListener and the GestureRotateListener.

Let us know if you cant get it to work!

@HLneoh

This comment has been minimized.

Copy link

commented Sep 4, 2018

@achuvm Yes, I am able to achieve that. However, I cannot get a smooth rotating and scaling. My issue sometimes conflig actions, for example when I using two fingers to rotation but model do zoom out or zoom in and when I want to scale model then that do rotation model.

@achuvm

This comment has been minimized.

Copy link
Contributor

commented Sep 4, 2018

Hi @HLneoh,

Hmm, that sounds like an issue with the callbacks if the rotating and pinch gestures are being mis-characterized by the callbacks. We'll have to take a look at this and fix any issues in a future release.

In the meantime, you can add your own OnTouchListener by calling setOnTouchListener() on ViroViewARCore. That way you can use any public code out there to process Android touch events. These will compute 2D coordinates so you may need a way for the user to tell you which object should be rotated/scaled.

Thanks,

@dthian

This comment has been minimized.

Copy link
Contributor

commented Sep 14, 2018

Hey @HLneoh, as Andy mentioned, you can add your own OnTouchListener to handle the rotate/gesture listeners yourself (we actually use Android's built in rotate/gesture listeners to trigger the gesture callback events).

Else, you should also have all the information you need (pinch / rotation values) to determine your own custom threshold, and thus to toggle between rotating or scaling your 3D object.

@lezan

This comment has been minimized.

Copy link

commented Jul 1, 2019

@achuvm Yes, I am able to achieve that. However, I cannot get a smooth rotating and scaling. My issue sometimes conflig actions, for example when I using two fingers to rotation but model do zoom out or zoom in and when I want to scale model then that do rotation model.

Is it still an issue? Because I am experience the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.