derenlei / Unity_Detection2AR

Localize 2D image object detection in 3D Scene with Yolo in Unity Barracuda and ARFoundation.
https://derenlei.medium.com/object-detection-with-localization-using-unity-barracuda-and-arfoundation-794b4eff02f8
MIT License
223 stars 61 forks source link

Anchors Facing The Camera #23

Closed KracelKany closed 3 years ago

KracelKany commented 3 years ago

Is there a way to make the Anchors face the camera all the time? I don't seem to find the way to do it.

derenlei commented 3 years ago

Hi @KracelKany,

You could attach this script to your anchor: https://github.com/derenlei/Unity_Detection2AR/blob/main/Assets/Scripts/NewText.cs. It's already attached to the Text Anchor example.

KracelKany commented 3 years ago

Thank you very much! I don't remember if the Text Box in the hieararchy used it, because I deleted from there and using only from prefabs and that one didn't have it. Do you have some insights/hints on where to start if I want to change the Text anchor to show some description of the object triggered by a canvas button? Or should I start a new issue? I am quite new to GitHub.

KracelKany commented 3 years ago

Do you have some insights/hints on where to start if I want to change the Text anchor to show some description of the object triggered by a canvas button? Or should I start a new issue? I am quite new to GitHub.

I figured it out.