Add Text Node #25
Answered
by
CariusLars
Doppelklick
asked this question in
Q&A
-
Hi, I'm very new at AR and the examples are a good start. But now I want to add a dynamic text (distance from camera to object). I didn't find examples - so can you give me an idea how to do this? Best, |
Beta Was this translation helpful? Give feedback.
Answered by
CariusLars
Aug 9, 2021
Replies: 1 comment
-
Hi @Doppelklick, I'm not 100% sure what you mean with dynamic text, but here are some ideas:
Hope that helps, let me know if you need more information! Contributions to the plugin are always very welcome in case you want to add additional functionality to solve your problem :) Cheers Lars |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
CariusLars
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @Doppelklick,
I'm not 100% sure what you mean with dynamic text, but here are some ideas:
getCameraPose()
in the ARSessionManager and calculate the distance between the camera and your object using the returned pose and the world position of your respective object. You can then add a text widget in your flutter app that displays the result, dynamic updates could be achieved by e.g. calling the method in each new frame and updating the widget using stateful widgets or the provider pattern. Please note that thegetCameraPose()
method is not on the main branch yet, …