Jump to content

Cordova device orientation


brianzinn
 Share

Recommended Posts

I was looking through the VR input for device orientation to see if it worked with Cordova by default - looks like no.

Was wondering if anybody has experience hooking up gyroscope to camera inputs. I see listeners added for only "window.orientationchange" and "window.deviceorientation".

Link to comment
Share on other sites

Hi, 

Shouldn't this work out of the box? The cordova orientation plugin is deprcated (as far as I know), since the devices expose the event scorrectly. See the last comment on this page - https://github.com/apache/cordova-plugin-device-orientation

If it isn't, we need to check what events are actually being triggered so we can see what's missing.

Link to comment
Share on other sites

3 hours ago, RaananW said:

Hi, 

Shouldn't this work out of the box? The cordova orientation plugin is deprcated (as far as I know), since the devices expose the event scorrectly. See the last comment on this page - https://github.com/apache/cordova-plugin-device-orientation

If it isn't, we need to check what events are actually being triggered so we can see what's missing.

Yes, it works without any plug-in.  I tested with the DeviceOrientationCamera, not the VR variant as I do not currently have the hardware.  I used a simple computer generated scene, with the camera inside of a cube, each side colored differently, and the normals reversed.  It worked fine on an actual Android device attached via USB.

I also am planning a web audio soon.  Have an Ipad, but need a Mac to test on that.  Mine is too old & starting to fail.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...