Distance Measurement #96
-
Hello, I am new to AR. I would like to use this plugin for my school project to measure distance in Augmented reality. Please guide me to use this plugin. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
After placing two anchors on a plane (and putting those anchors into variables you can reference them from), use this function to calculate the distance in meters between those two anchors. See the examples from the package documentation for the rest of the implementation. This won't display a measurement in the scene, but for now, you can put formatted text with that value elsewhere on your screen as a Text widget. |
Beta Was this translation helpful? Give feedback.
-
hey. Did you implement this? |
Beta Was this translation helpful? Give feedback.
After placing two anchors on a plane (and putting those anchors into variables you can reference them from), use this function to calculate the distance in meters between those two anchors.
https://pub.dev/documentation/ar_flutter_plugin/latest/managers_ar_session_manager/ARSessionManager/getDistanceBetweenAnchors.html
See the examples from the package documentation for the rest of the implementation. This won't display a measurement in the scene, but for now, you can put formatted text with that value elsewhere on your screen as a Text widget.