Skip to content

Distance Measurement #96

Answered by Tommy-Elliott
akankshaSha asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by CariusLars
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants