ARCore-Location icon indicating copy to clipboard operation
ARCore-Location copied to clipboard

How to hide a marker when user go out of fixed range of distance?

Open MuhammadAasharib opened this issue 7 years ago • 4 comments

Hi, I am having trouble in hiding a marker when user go out of range in which a model is rendered. I have seen setOnlyRenderWhenWithin() but its only for rendering. Is there any method for hiding the marker if user go out of range?

Thanks in advance for the answer.

MuhammadAasharib avatar Sep 23 '18 06:09 MuhammadAasharib

There isn't currently a method for this - feel free to fork the library, and create a pull request with the feature

johnwedgbury avatar Sep 24 '18 11:09 johnwedgbury

Hello, I try to do the same thing as you. I want to hide the view when it exceeds a certain distance. Knowing that the max distance is refreshed by the user thanks to a seekbar. I use setOnlyRenderWhenWithin, but when I update the distance thanks to the seek bar nothing happens the view is always displayed

do you have to remove the node from the scene and then add it with the new setOnlyRenderWhenWithin value for actualize the max distance ?

thanks if you have a solution.

Shnafon avatar Sep 26 '18 15:09 Shnafon

what is the use for location.setDistanceLimit(int distance) method?

is this cannot be used for the asker's purpose?

ashif-ismail avatar Oct 07 '18 13:10 ashif-ismail

Hello,

the only solution I found for this problem is to remove the markers from the mLocationMarker list reset the set OnlyRenderWhenWithin and re add to the marker list

sorry for my bad english..

Shnafon avatar Oct 11 '18 13:10 Shnafon