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
360videos with device motion #7
Conversation
19ba74a
to
2c64eb0
Compare
btw here are videos for testing : https://www.mettle.com/360vr-master-series-free-360-downloads-page/ |
I'm really rusty at this sort of math, so take everything I'm saying with a grain of salt, but that rotation problem sounds a bit like the sorts of behaviors you see when encountering gimbal lock. If that's the case, the solution would be to switch from using Euler angles to Quaternions. The math is a bit of a pain, but they are exposed as part of the |
yes the problem is less the iPhone side of things. |
before merging this PR still needs to address the following:
|
05f7c7d
to
f7d29c5
Compare
This works now with gesture recognizer and devicemotion BUT it feels weird once you use devicemotion again after panning. I can't say why that is exactly but I feel like that could go into a follwo up commit |
Hum, I thought my patch was working well... |
@magwyz Yes your patch worked fine for the devicemotion alone. But once I add panning to the mix and change the starting point for the devicemotion it seems to experience some axe switching :( The video is old btw. The patch is a commit btw. I just removed the file itself that I commited by accident |
@carolanitz Panning is moving the video with the fingers, right? |
yes panning is moving with fingers and I don't want to add a set angle to the rotations. I'm just saving the location the user panned to and then add the devicemotion diff to that position. but that seems to mess up roll and yaw somehow |
@magwyz It's okay for a first version but I will create a ticket for followup work. |
Do not use the Euler angles provided by CoreMotion as they are not defined in the same reference frame as libvlc. Signed-off-by: Carola Nitz <nitz.carola@googlemail.com>
adjusted Bool properties from nonatomic to assign turned interfacelock off for 360Videos
lastEuler.pitch was accidentally set twice which resulted in jumping and removing the screenscale + adjusting the zoomfactor makes panning and zooming more responsive
6e1658c
to
fc80bfe
Compare
@carolanitz Ok, I understand what you want to achieve but I have no fix in mind when I read the MR. Do as you want for the first version. If you want, I will also be able to have a look when I go back to work next week and have access to the Mac and a device. |
@magwyz that's basically what we decided on :) it already feels so much better than what we have currently 😄 |
@carolanitz Sorry, I don't get it. What have you decided? What is better than currently? |
That we merge it in as is and these changes from this Pull request are better than what we currently have for 360 in the shipped Appstore app. We can then follow up with a patch release to make it perfect once you're back |
ok, fair enough. :-) |
on iPad with iOS 9 and higher shouldAutorotate is never called since all orientations are supported by default when we support multitasking. This lead to no rotationlock when interfacelock was enabled or a 360 video was played. We're now using supportedInterfaceOrientations: and lock 360 videos to portrait and for interfacelock we save the current orientation and return it.
3132b79
to
6e87a1e
Compare
merged with : |
It's still work in progress but I wanted to share this.
I'm still having the problem that when I hold the phone exactly opposite of the starting point I see the exact start frame upside down again and currently the gesturerecognizers are completely overwritten.