SceneView / sceneview-android

SceneView is a 3D and AR Android Composable and View with Google Filament and ARCore. This is a Sceneform replacement in Kotlin
Apache License 2.0
850 stars 161 forks source link

Can't call getWorldPosition #540

Closed dhatriparakal closed 1 month ago

dhatriparakal commented 4 months ago

I'm trying to take measurements with AR. So far I'm using the coordinates of a polygon from a hitTest to calculate lengths; however, those coordinates are based on the length on screen and not the distance in real life.

val hitResults = frame?.hitTest(motionEvent.x, motionEvent.y)
val hitResult = hitResults?.firstOrNull { hit ->
    hit.trackable is Plane && (hit.trackable as Plane).isPoseInPolygon(hit.hitPose)
}
val world = hit.trackable.getWorldPosition()

I want to use getWorldPosition() to get the real-world length, but hitResult.trackable.getWorldPosition() doesn't work - can someone please help me with this?

github-actions[bot] commented 1 month ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 month ago

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.