Topic: 3D markers problem

Hi, my name is Nicolas. I bought your package a week ago and it's one of the best i've bought. Thank you for the work you've done on it.

I'm managing to do all i want with it but i have a weird think happening. I am using a tileset map and i'm trying to spawn 3D markers when the scene is loaded. It's working great for some of them, but not for others. If it is of any help, for now i am working on pc, not on mobile yet.

At first i spawn the player's marker, works great, it gets spawned at the coorfinates i want, moves with the map when i drag the map with the mouse, perfect.
Then i spawn a base/HQ for the player, gets instantiated at the right coordinates, but gets disabled right from start.  when i enable it manualy, it doesn't move when the map is dragged. And when i don't do it manualy, it only gets enabled when zooming is at 3 or 4.
Finaly i spawn my enemies markers using a list, and just the player, everything works perfectly.

here are the functions i am using:

    public void SpawnPlayer()
    {
        OnlineMapsControlBase3D control = map.GetComponent<OnlineMapsControlBase3D>();
        if (control == null)
        {
            Debug.LogError("You must use the 3D control (Texture or Tileset).");
            return;
        }
        else if (control != null)
        {
            locationPlayerMarker = control.AddMarker3D(DataSaver.lastSavedGPSPos, playerMarkerPrefab);
            playerComp = locationPlayerMarker.instance.GetComponent<PlayerMarker>();
            playerComp.attackButton = attackButton;
            playerComp.killText = killText;

            // Subscribe to change zoom.
            OnlineMaps.instance.OnChangeZoom += OnChangeZoom;

            // Initial rescale marker.
            OnChangeZoom();


        }

and

public void SpawnBunker()
    {
        OnlineMapsControlBase3D control = map.GetComponent<OnlineMapsControlBase3D>();
        if (control == null)
        {
            Debug.LogError("You must use the 3D control (Texture or Tilset).");
            return;
        }
        else if (control != null)
        {
            locationBunkerMarker = control.AddMarker3D(new Vector2((float)DataSaver.bunkerLat, (float)DataSaver.bunkerLong), bunkerMarkerPrefab);
            OnlineMaps.instance.OnChangeZoom += OnChangeBunkerZoom;

            OnChangeBunkerZoom();
        }
    }
}

Is there anything i forgot to do?

Re: 3D markers problem

Hello.

The second script. You confused the latitude and longitude. It should be:

locationBunkerMarker = control.AddMarker3D(new Vector2((float)DataSaver.bunkerLong, (float)DataSaver.bunkerLat), bunkerMarkerPrefab);
Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: 3D markers problem

Thanks a lot, it worked. Thanks for the quick answer.