Search code examples
androidandroid-studiosceneform

Sceneform - How to make the camera view too autofocus


So, the default camera view in sceneform is in fixed focus settings. But its blur and doesn't feels good. I want to get the camera to show everything clearly (Autofocus mode).

I tried changing the session config. But it is not really working.


Solution

  •  override fun getSessionConfiguration(session: Session?): Config {
        val config = Config(session)
        config.focusMode = Config.FocusMode.AUTO
    
        return config
    }