0

Friends I want to add shaper for show 360 video and 360 with camera position, Current we can add successfully all the function and its working fine, But the problem is the shaper taking time to load on screen because in background finding tracking points, in normal condition we are able to plot fast but in dark area or dark space we are not easily finding tracking point so taking time or some time cant able to place node with shaper.

I tried bellow code but its not working well If any one have expertise or experience in scenform or AR/VR plz help us.

Code

val session: Session? = arFragment.arSceneView.session
        if (session != null) {
            val frame = session.update()
            val changedConfig = session.config
            changedConfig.lightEstimationMode = Config.LightEstimationMode.AMBIENT_INTENSITY
            session.configure(changedConfig)
            try {
                val pos = floatArrayOf(
                    arFragment.arSceneView.scene.camera.worldPosition.x,
                    arFragment.arSceneView.scene.camera.worldPosition.y,
                    arFragment.arSceneView.scene.camera.worldPosition.z
                )
                val rotation = floatArrayOf(0f, 0f, 0f, 1f)
                val anchor: Anchor = session.createAnchor(Pose(pos, rotation))
                addShaperNodeOnPosition(anchor)
            } catch (e: Exception) {
                e.printStackTrace()
            }
        }
Dhaval Solanki
  • 4,589
  • 1
  • 23
  • 39
  • If placing an object 1M (for example) in front of the centre of the camera will meet your needs you can do this as shown here: https://stackoverflow.com/a/56681538/334402. This answer was using the original Sceneform before it was archived but the same approach should still work in the newer Sceneform, I believe. – Mick Oct 20 '22 at 12:47

0 Answers0