tranlong021988 Posted July 13, 2016 Share Posted July 13, 2016 Hi everyone, I already face to new issue with DeviceOrientationCamera. First, you may take a look my game (with mobile browser, ofcourse): https://dl.dropboxusercontent.com/u/86585940/BabylonWave/optimized4/index.html Don't touch/tap, just move you phone to look around slowly, when camera pan to JetSki, it cause a fast flicker. Then you touch/tap the screen, the game begin, and you can see flicker issue happen sometimes. And it's not random, I notice that it only happen when camera.y value between -1.5 and -1.6. I already create a PG with a simple scene, just change current Camera to DeviceOrientationCamera, and that issue happen,too. You can check here(with mobile browser): http://www.babylonjs-playground.com/#16OJL4 So anyone can help ? Sorry for my poor English. Quote Link to comment Share on other sites More sharing options...
RaananW Posted July 13, 2016 Share Posted July 13, 2016 Hi tranlong, I checked your demo and it didn't really flicker. I do believe however there is an issue, so if you don't mind I'll ask a few questions: 1. Did you try with one single mobile, or did you try with a few? 2. What do you mean with camera.y? Position? 3. In your demo, I'd the camera attached to any mesh (parent or child)? And: Can anyone else test the scene and see if it flickers? Thanks! tranlong021988 1 Quote Link to comment Share on other sites More sharing options...
Nabroski Posted July 13, 2016 Share Posted July 13, 2016 demo not flickering playground flicker looks like a value = something; renderloop( value *=-1; )http://www.babylonjs-playground.com/#NUH5F#0 Best tranlong021988 1 Quote Link to comment Share on other sites More sharing options...
tranlong021988 Posted July 13, 2016 Author Share Posted July 13, 2016 @RaananW: I just test in my mobile Google Nexuus 6, and already record some video from my mobile screen. - Playground test: - My game demo (landscape): - My game demo (portrait): 2. My mistake, I mean camera.rotation.y and actually scene.activeCamera.rotationQuaternion.toEulerAngles().y since I use RotationQuaternion. 3. I just create a simple DeviceOrientationCamera in scene, no attach to any mesh. My girlfriend test it :"Is there something in my eyes or your game go flicker, honey ?". Quote Link to comment Share on other sites More sharing options...
Nabroski Posted July 13, 2016 Share Posted July 13, 2016 (edited) @tranlong021988 try to hit the "right" value exactly, so the flickering becomes really "visible" - continue. i use this as creative effect. hope they not bug fixing it everywhere. Best Edited July 14, 2016 by Nabroski bugs are good tranlong021988 1 Quote Link to comment Share on other sites More sharing options...
tranlong021988 Posted July 13, 2016 Author Share Posted July 13, 2016 @Nabroski: The top-left number in my game showing Y-axis Camera Rotation, and I used 1000% focus power to notice that value between -1.5 and -1.6, sometime it go up to some positive number. @RaananW: I think it cause that issue. Quote Link to comment Share on other sites More sharing options...
tranlong021988 Posted July 14, 2016 Author Share Posted July 14, 2016 after convert camera rotation y from Radian value to Degree, I notice that flicker happen when this value hit -90 degree. It's not random number. Seem that something wrong in Device Orientation Camera source code. I will try with some another devices for sure. Quote Link to comment Share on other sites More sharing options...
Nabroski Posted July 14, 2016 Share Posted July 14, 2016 I'm sure they work on it right now, meanwhile: u can add a tribune with shouting people, some sounds, would also be nice. Maybe the bugfix never comes, - so you could add some sharks that jump out of the water, at a specific device rotation, and dragging the player under water. the possibilities are endless. Best I debug my device drawcalls, and the window of the browser runs at ~60fps but the playground is still at 16pfs, maybe a synch. problem. at somepoint the playground try to take thouse 60 from the browser. and its flickering. Quote Link to comment Share on other sites More sharing options...
tranlong021988 Posted July 14, 2016 Author Share Posted July 14, 2016 it seem that it happen on my mobile only. Not know why. Quote Link to comment Share on other sites More sharing options...
Nabroski Posted July 14, 2016 Share Posted July 14, 2016 and i dont mind about flickering also. problem solved. thread closed Quote Link to comment Share on other sites More sharing options...
RaananW Posted July 18, 2016 Share Posted July 18, 2016 So! You can't change the camera's ration by yourself. As this is a device orientation camera, changing the rotation will cause it to... flicker, and then go back to the rotation the device is sending. Let the device do its own thing. If you want to rotate the camera, you will have to do it in a beforeRender loop, and using quaternions (multiply the rotation you want with the camera's rotationQuaternion). tranlong021988 1 Quote Link to comment Share on other sites More sharing options...
tranlong021988 Posted July 19, 2016 Author Share Posted July 19, 2016 @RaananW : I used to try to make a custom Device Orientation handler but that code is removed, and don't touch anything to modify camera rotation. Since that issue happen only on my device so I just give up. 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.