JohnK Posted June 8, 2016 Share Posted June 8, 2016 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? Quote Link to comment Share on other sites More sharing options...
Wingnut Posted June 8, 2016 Share Posted June 8, 2016 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. Quote Link to comment Share on other sites More sharing options...
JohnK Posted June 8, 2016 Author Share Posted June 8, 2016 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? Wingnut 1 Quote Link to comment Share on other sites More sharing options...
dbawel Posted June 10, 2016 Share Posted June 10, 2016 @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 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 13, 2016 Share Posted June 13, 2016 Did you use the very latest 2.4 version? @RaananWfixed a lot of issues with this camera recently Quote Link to comment Share on other sites More sharing options...
RaananW Posted June 13, 2016 Share Posted June 13, 2016 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. Quote Link to comment Share on other sites More sharing options...
JohnK Posted June 13, 2016 Author Share Posted June 13, 2016 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. GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
RaananW Posted June 14, 2016 Share Posted June 14, 2016 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. Wingnut 1 Quote Link to comment Share on other sites More sharing options...
dsman Posted June 14, 2016 Share Posted June 14, 2016 @RaananW which playground link. I want to try. I will need DeviceOrientation Camera too. Quote Link to comment Share on other sites More sharing options...
RaananW Posted June 14, 2016 Share Posted June 14, 2016 Hi @dsman, The first one JohnK has posted - http://www.babylonjs-playground.com/#12WBC#74 Or this without the sensibility factors - http://www.babylonjs-playground.com/#12WBC#79 Quote Link to comment Share on other sites More sharing options...
dsman Posted June 14, 2016 Share Posted June 14, 2016 @RaananW Just checked it. It is working fine. Thanks. So in order to get VR experience in CardBoard type portable VR headset for phones, do we need to draw two canvas and render two camera positioned little apart from each other ? Quote Link to comment Share on other sites More sharing options...
RaananW Posted June 14, 2016 Share Posted June 14, 2016 Nope, you can use the vr device orientation camera, also fixed in 2.4 Like this - http://www.babylonjs-playground.com/#12WBC#80 , but of course in full screen Quote Link to comment Share on other sites More sharing options...
dsman Posted June 14, 2016 Share Posted June 14, 2016 @RaananW I was hoping DeviceOrientationCamera to do that. But since it didn't I thought its something we have to manage. But a question here. Will it reduce the FPS by half ? Since its rendering two cameras internally ? Quote Link to comment Share on other sites More sharing options...
RaananW Posted June 14, 2016 Share Posted June 14, 2016 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.