I'm using GVR Android library version 1.190 and trying to play both 360 and 180 degrees videos in the video360 example project. In both cases the 2D view (MonoscopicView) starts the playback fine, but the viewer camera position is never centered to the center of the video. It instead starts randomly off-centered by horizontal axis. Same behavior on multiple devices. Anyone knows how to center the view to the video center when 2D view starts?
Related Questions in ANDROID
- Creating global Class holder
- Flutter + Dart: Editing name of a tab shows up a black screen
- android-pdf-viewer Received status code 401 from server: Unauthorized
- Sdk 34 WRITE_EXTERNAL_STORAGE not working
- ussd reader in Recket Native module
- Incorrect display of LinearGradientBrush in IOS
- The Binary Version Of its metadata is 1.8.0, expected Version is 1.6.0 build error
- I can't make TextInput to auto expand properly in Android
- Creating multiple instances of a class with different initializing values in Flutter
- How to create a lottie animation
- making android analyze with coverity sast tool
- Flutter plugin development android src not opening after opening example
- I initialize my ViewModel in the Activity with several fragments as tabs, but the fragments(tabs) return null for the updated livedata
- Node.js Server + Socket.IO + Android Mobile Applicatoin XHR Polling Error...?
- How I can use the shared preferences class?
Related Questions in GOOGLE-VR
- anyone know how to pass 6Dof sensor data in Avtarposer?
- Google cardboard VR closing the whole application after pressing switching VR off button
- Building a 360-Degree Image Viewer with Interactive Rotation in Android
- VrVideoView is not importing after download google VR SDK. 360 3d video play on app
- Unity Build Failure: A failure occured while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
- Quickstart for Google Cardboard for Unity Plugin for Unity 2019.4.25f & later Doesn't Install The Samples Folder
- Changing from two lense into one view. Unity GoogleVR
- How to detect UI Objects from Main Camera object when using Google Cardboard VR SDK for Unity
- How to start in VR with google cardboard?
- How to assign event trigger pointer click as Fire1 in Google VR Cardboard Unity 2019
- Unable to check Cardboard XR Plugin in unity
- Cannot install HelloCardboard into unity
- Cardboard-xr-plugin causes the VR environment to stutter when moving the camera
- Unity | Use AR and VR in the same app but not simultaneously
- Unity GoogleVR DLLNotFoundException 'gvr'
Related Questions in GOOGLE-VR-SDK
- Building a 360-Degree Image Viewer with Interactive Rotation in Android
- Is it possible to add/play audio from the external storage (/storage/emulated/0) in Android Studio using the GvrAudioEngine API?
- VrVideoView is not importing after download google VR SDK. 360 3d video play on app
- Quickstart for Google Cardboard for Unity Plugin for Unity 2019.4.25f & later Doesn't Install The Samples Folder
- HelloCardboard sample :sdk not visible in Gradle
- Unity | Use AR and VR in the same app but not simultaneously
- Can we create and load VR model (Objects, Conference Room) in Android NDK with Google Cardboard SDK without using unity?
- Unable to build Google VR app for Android in Unity
- GoogleVR SDK and VLC library integrated via pod not working together in iOS
- How to fix NDK build error for HelloCardboard sample
- Google Cardboard: How to rotate object while using autowalk in Unity?
- is there a gaze only (as opposed to click/button input) mode in unity3d google vr sdk?
- GoogleVR library not supporting 64-bit requirement from playstore
- How to include objectiveC dependency in a swift library
- Unity - enable VR support for just one scene
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Turns out that sensor data from Sensor.TYPE_GAME_ROTATION_VECTOR are having very different values (angles) every time my activity register a listener to it. It only takes a small tilt of the phone to get really different values. Different devices also respond differently but they all have offset readings. This lead to the initial view angle being positioned (usually) 90 degrees either to the left or right from the center of video. Thanks to this post, I managed to calculate the initial heading offset and rotate phone position matrix to compensate.
Add a member variable
private float initialHeadingwith initial value 0. Then, in PhoneOrientationListener's onSensorChanged add the following code after the Android to OpenGL matrix rotation: