I am using following image in VrPanoramaView
When i load it in the view, it looks like this.
But i want it to move the image to left side dynamically before opening the image, like this.
I can move the image with finger, but i want it to set its angle at the loading time.
This is my code.
VrPanoramaView.Options options = new VrPanoramaView.Options();
InputStream inputStream = null;
AssetManager assetManager = getAssets();
inputStream = assetManager.open("test_2"+ ".jpg");
options.inputType = VrPanoramaView.Options.TYPE_MONO;
mVrPanoramaView.loadImageFromBitmap(BitmapFactory.decodeStream(inputStream), options);
mVrPanoramaView.setStereoModeButtonEnabled(false);
mVrPanoramaView.setInfoButtonEnabled(false);
mVrPanoramaView.setPureTouchTracking(true);
mVrPanoramaView.setFullscreenButtonEnabled(true);
I tried mVrPanoramaView.setPivotX(100);, but it does not make any impact. I need to know how to translate image in panorama view with using any hand gesture.
I am using GoogleVrSDK
implementation 'com.google.vr:sdk-base:1.160.0'
implementation 'com.google.vr:sdk-panowidget:1.170.0'
from How to move image in VrPanoramaView dynamically



No comments:
Post a Comment