DanijelHuis / HDAugmentedReality

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

Directional arrows #19

Closed ambujpunn closed 7 years ago

ambujpunn commented 7 years ago

Is it possible to add arrows in the direction of which the views are being shown? So the user knows whether to turn their phone left, right, up, or down to see the views based on which direction the arrow is pointing to. I'm assuming some work with the compass would be required

DanijelHuis commented 7 years ago

This is not currently implemented, maybe in the future.

Rjmaurya13 commented 5 years ago

Hi @DanijelHuis,

Can you help me, how to achieve this? Like to know user directions.

DanijelHuis commented 5 years ago

If you want to show arrows pointing directly to annotation views, that is a problem, because ARPresenter.addRemoveAnnotationViews functions removes annotation views that are not currently on screen, this is done due to performance.

If you want to do this you need to: 1) Modify ARPresenter.addRemoveAnnotationViews and disable removing annotation views 2) Now ARPresenter.onScreenAnnotationViews contains all annotation views, you can use frame property of each view and calculate positions of your arrows.