appoly / ARCore-Location

Allows items to be placed within the AR world with real-world GPS coordinates using ARCore.
https://www.appoly.co.uk/arcore-location/
MIT License
478 stars 154 forks source link

How to put multiple markers . #48

Open ankurjaincanopus opened 6 years ago

ankurjaincanopus commented 6 years ago

Hii ,

This is not an issue , but i want some help in distance between the current location and marker which i placed in screen. I have placed all marker in AR screen but distance between the current location an markers is not correct. It is showing the distance from last added marker.

Here is the code snippet.


I have put this code into screenView ArrayList lm = getAllRibbonsInRenderSurface(); lm.add(layoutLocationMarker); locationScene.mLocationMarkers.addAll(lm);


/**

Please help , thanks in advance.

basitsaleemmb commented 6 years ago

you can see here how to add multiple markers to scene.

20

ankurjaincanopus commented 6 years ago

Hi @basitsaleemmb i have tried this it works fine and add different object but in my case distance between nodes are incorrect because each time it adds same object at different location that is last object node. but thanks for your answer. In that case i have to create multiple object of ViewRenderable but it is crashing the application when there are more objects.

Code : viewRenderables = new CompletableFuture[ribbonArrayList.size()]; // CompletableFuture exampleLayout1; for (int t = 0; t < ribbonArrayList.size(); t++) { viewRenderables[t] = ViewRenderable.builder() .setView(LocationActivity.this, R.layout.item_ribbon_show) .build(); }

Thanks

ashif-ismail commented 6 years ago

If it crashes,what does your logcat tell ? post that here..

and if you want to stabilize the anchors at a fixed position / you want to minimize the frequent callbacks from sensor

you can try setting the refresh rate like this

locationScene.setAnchorRefreshInterval(60); locationScene.setMinimalRefreshing(true);

this makes sure that,your nodes will be updated only once in every 60 seconds.

ankurjaincanopus commented 6 years ago

why I am getting these notifications?

On 5 October 2018 at 10:00, basitsaleemmb notifications@github.com wrote:

you can see here how to add multiple markers to scene.

20 https://github.com/appoly/ARCore-Location/issues/20

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/appoly/ARCore-Location/issues/48#issuecomment-427242967, or mute the thread https://github.com/notifications/unsubscribe-auth/AbnWXM851USmCOJd1VmxDSE8Emc8rdX0ks5uhuBqgaJpZM4XAaAh .

Shnafon commented 6 years ago

@SheikhZayed Hi if you use setAnchorRefreshInterval the problem you may encounter is that the first initialization of the marker in your scene is surely not precise it takes a little time for the sensor to put it in place so the fact of refresh every 60 seconds will provide you an incorrect display

sorry for my bad english

ankurjaincanopus commented 6 years ago

PLEASE UNFOLLOW ME

On 11 October 2018 at 19:04, Shnafon notifications@github.com wrote:

@SheikhZayed https://github.com/SheikhZayed Hi if you use setAnchorRefreshInterval the problem you may encounter is that the first initialization of the marker in your scene is surely not precise it takes a little time for the sensor to put it in place so the fact of refresh every 60 seconds will provide you with an incorrect display

sorry for my bad english

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/appoly/ARCore-Location/issues/48#issuecomment-428957305, or mute the thread https://github.com/notifications/unsubscribe-auth/AbnWXN2bs5RRJIJ6AibSgVVt4ZU1w7b_ks5uj0j4gaJpZM4XAaAh .