Closed SyedMoizoffical closed 1 month ago
sessionConfiguration = { session, config -> config.depthMode = when (session.isDepthModeSupported(Config.DepthMode.AUTOMATIC)) { true -> Config.DepthMode.AUTOMATIC else -> Config.DepthMode.DISABLED } config.lightEstimationMode = Config.LightEstimationMode.ENVIRONMENTAL_HDR
config.planeFindingMode = Config.PlaneFindingMode.VERTICAL. // add this for vertical surface
},
Already added
Have you tried Config.PlaneFindingMode.HORIZONTAL_AND_VERTICAL?
In the little time I've been developing with this library, I don't notice that the VERTICAL configuration was available.
try this
frame.getUpdatedPlanes() .firstOrNull() ?.let { plane -> addAnchorNode(plane.createAnchor(plane.centerPose)) }