Topic: Adding marker position

I'm adding a marker using:

'OnlineMapsMarker3D marker3D = control.AddMarker3D(lon,lat, prefab);'

This works great, but I want to adjust the Y position of the 3D marker(game object) in the scene.  For example, the marker instance transform position based on the lat/long might be (10, 0, 15).  I want to change the Y but can't figure out how.  Here's what I've tried:

// Get the 3D marker game object

GameObject currMarkerGO = currMarker.instance.transform.gameObject;

// Get the position vector

Vector3 pos = currMarkerGO.transform.position;

// Change Y pos

pos.y = 3.5f;

// Update marker position in scene

currMarker.instance.transform.position = pos;

Thanks.

Re: Adding marker position

Hello.

You have two ways:
1. OnlineMapsMarker3D.altitude
2. Wrap your 3d marker to a new GameObject, create a prefab from an external GameObject, and use new prefab for 3d markers.
In this case, you can modify the position, rotation and scale of the internal GameObject.

Kind Regards,
Infinity Code Team.

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

Re: Adding marker position

Thanks Alex, #2 worked great.  In case anyone is confused:

Prefab hierarchy...

SomeGameObject     // <-- this is 3D map marker game object
   ChildGameObject   // <--- change pos/rot/scale of this game object