DanijelHuis / HDAugmentedReality

Augmented Reality component for iOS, written in Swift.
MIT License
480 stars 97 forks source link

Setting Angle of Annotation #46

Closed gp-wang closed 7 years ago

gp-wang commented 7 years ago

Hi,

I am trying to implement a scene: there are several shops on a street, and each shop has an annotation in front of them, the direction of the notation is fixed relative to the face of the shop. So user can only see clearly the annotation when they walk right in front of the shop.

Currently it seems all annotations are facing directly to the user, no matter that is the relative position between the user and the shop.

It would be great if there is a feature or a way to achieve this implementation, as it gives user more immersive experience.

DanijelHuis commented 7 years ago

Main purpose of this library is the ability for the user to open app in the middle of the city and see what is around him. If annotations don't face him then he can't read it.

Regarding your suggestion: For this to work, library will have to know orientation of every shop, unless you provide it, I don't see a way to get it. If you have orientations of those shops than you can make ARAnnotation subclass, add orientation property, and in ARAnnotationView subclass use that to set CATransform.

It is an interesting concept but usable only in specific situations.