Untitled
onSessionUpdated = { session, updatedFrame -> // frame = updatedFrame val earth = session.earth if (earth?.earthState == Earth.EarthState.ENABLED) { anchorlist.forEach { it.detach() } anchorlist.clear() count-- if(count == 0){ // childNodes.clear() latlongpointslist.forEach { latLng -> val anchor = createDestinationAnchor(earth, latLng) anchor?.let { anchorlist.add(anchor) childNodes += createAnchorNode( engine = engine, modelLoader = modelLoader, materialLoader = materialLoader, anchor = it ) } } Log.d("ct", "count=: "+count) } }else{ Log.d("ct", "earht=: null") } },
Leave a Comment