Jump to content

DeviceOrientationCamera not working


JohnK
 Share

Recommended Posts

Been trying out the deviceOrientationCamera and cannot get it to work on my tablet (Android 5.1 )

Attempt at http://www.babylonjs-playground.com/#12WBC#74

I also noticed that whatever I set the   xxxxxSensibility s to they read as 0 (but this was on a PC that has no orientation).

Does it work on anyone's mobile device?

Any ideas on what to change?

 

Link to comment
Share on other sites

Same here.  I worked a customer service ticket about VRDeviceOrientationFreeCamera earlier, and it was NOT working with mouse drags (only cursor arrows). 

Now I don't know IF a VR DevOriFreeCam SHOULD work with the mouse, but I think it used-to.  *shrug*  Me thinks something went goofy with orientation.  I, too, have no orientation-driven devices.

Thanks for the report, John.  YOU get to work on the orient-device simulator, and I'll get another cup of coffee and watch with interest.  :)

Link to comment
Share on other sites

Thank's for the reply Wingy. It made me check my tablet which I thought was orientation-driven as some games required twists and turns to the tablet to get things to move. It must be code within the apps. Tried the playground on my smart phone and got some effects. Not quite right. Will play with sensibilty properties. Trying to construct simple PGs to go with my version of documentation? rather than simulator?

Link to comment
Share on other sites

@JohnK -

This is not a simple issue, as there are multiple factors in creating a single scene which will work on multiple devices; mainly that every device has unique orientation settings, as well as the browser must often be enabled for webvr if that is your ultimate goal for the end-user. Below is a quick reference - not much help, but there are other more device specific links which are easy to find:

https://help.sketchfab.com/hc/en-us/articles/204777439-Mobile-VR-and-Desktop-WebVR

DB

Link to comment
Share on other sites

Hi, I tested with both Android and iphone (phones and one note tablet), the new device orientation camera is working on all. 

Sensibility was "canceled" as there is no sensibility here - it should take the angels from the device and set the 3d scene's rotation. The parameter is still available thou, as it is a part of a parent class.

Link to comment
Share on other sites

Deltakosh - was only writing a playground example to add to documentation so was using 2.4 but have not made colour changes when cutting and pasting so contains errors.

RaananW (and others) as long as I make a PG that you are happy it works I will be happy.

Will do edits next week as this week am on holiday in Venice yeah? its great to be retired.

Link to comment
Share on other sites

Hi John,

this playground works on all of the devices I test on. That's a Note 10.1 (Tablet), Nexus 5X, Xpheria Z1, Nexus 4, I will test on an iphone as well pretty soon.

Maybe first try other examples on the web to make sure your device supports the orientation events. Also, make sure you are using the latest chrome browser (or any other modern browser - firefox, dolphin etc'), as this is browser-dependent. I know some devices' native browser (not chrome sometimes) don't support that.

About mouse dragging and device orientation ( @Wingnut) - the device orientation camera receives its rotation from the device it is run on. The orientation is updated constantly (depends on the device, might be every 2-3 frames or even more). So a mouse would change the orientation - maybe for one single frame - and then the orientation event will reset it again. You can, of course, add mouse input to any camera using the new input system. I just didn't see a reason to add the mouse to any of the orientation cameras.

 

Link to comment
Share on other sites

well, not by half, as you are capped at 60 usually, so it might be 40-50 if your device is strong enough. But yes, you are rendering twice anyhow, so it will reduce fps on weak devices.

The VR device orientation camera takes care of everything for you, so no need to manage anything external for that.

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...