1 (edited by DaGround 2016-08-09 17:53:39)

Topic: Translate GPS Position into transformPosition

Hi,

i am trying to rotate the camera into the direction the map is moving.

When i get a new GPS ping, i'm lerping the map towards that point:
OnlineMaps.instance.position = Vector2.Lerp(fromPosition, toPosition, angle);

this works fine.

Now i want to move a GameObject on the corrsponding position in unity worldspace:

       
        this.unityPosition = OnlineMapsControlBase.instance.GetPosition(toPosition);
        target.position = new Vector3(this.unityPosition.x, 0 , this.unityPosition.y);
        gameObject.transform.LookAt(target);

This really doesnt work properly sad  any clues how i could properly achieve this?

Thanks! smile

Re: Translate GPS Position into transformPosition

Hello.

Use OnlineMapsTileSetControl.GetWorldPosition:
http://infinity-code.com/doxygen/online … ea663abc1f

Kind Regards,
Infinity Code Team.

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

Re: Translate GPS Position into transformPosition

Awesome, got it working.

Thanks!