Topic: Marker3d over buildings

Hello all,
I have some problems when I´m trying to set up some markers 3d on the map, when the position is in the same place of a building.
As I set up a floor height for buildings, the markers draws inside the building and sometimes (depending on the height of buildings) are hidden by them.

Is there any chance to avoid this situation, placing the markers on top of this buildings??

Many thanks.
Juan Luis

Re: Marker3d over buildings

Hello.

I'm not sure that for such purposes you need to use markers.

I would do it in another way:
1. Use OnlineMapsBuildings.OnBuildingCreated to determine the creation of buildings.
2. Use Collider.bounds or MeshRenderer.bounds of the building to find the top center point.
3. Create your GameObject (which previously planned to be used as a marker) as a child of the building, and set the position.

Kind Regards,
Infinity Code Team

Re: Marker3d over buildings

Thanks Alex for answering me,
but If I place the marker3d as a lat,lng position. I don´t know in which building is placed. So I cannot create the gameobject in that way.

In our APP we display the map (with buildings) and afterwards, we create some POI with lat,lng on it.

I´m facing to options
1- Detect if the lat,lng crashes with a building in that case we need to move it to a clear gap to pointing it.
2- If there is a buiding, place it on top.


Thanks

Re: Marker3d over buildings

According to your original post, I thought that you want to show the marker above the building.

In this case, this is much more difficult, because the size of the markers does not depend on the zoom, and the buildings have real size and position.

The easiest way is to check the intersection of bounds of each marker GameObject and bounds of each building.
But in this case you will get a big overhead when changing the zoom of the map.

I believe that there is a better way here, but I do not see it yet.

Kind Regards,
Infinity Code Team