Jump to content

Device Orientation Camera Flickering


tranlong021988
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

@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 ?". :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

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