ejeinc / MetalScope

Metal-backed 360° panorama view for iOS
MIT License
324 stars 72 forks source link

Gymbal lock #45

Open StanleyRussian opened 6 years ago

StanleyRussian commented 6 years ago

If you launch example, then physically rotate to the left or to the right, then try to look up or down you will get rotation by wrong axle. As mentioned in title I believe it is due to cymbal lock. Here's great answer on stack exchange regarding this issue: https://gamedev.stackexchange.com/a/136175

Unfortunately, my knowledge of swift is not sufficient to fix it, but if someone points me to line where the rotation is actually applied to camera I will try to fix it, since I did similar thing for UnityEngine